when did california become a state in the union