California votes to end gay marriage