Prior to the civil war questions of statehood and the spread of slavery led to the adoption of the idea of those living in a territory could determine if they wanted their state to be free or slaves state. This was decided by?