As self-driving cars move beyond Hollywood fantasy, states like California are coming up with ways to regulate them.