California gives final approval to code requiring solar on new homes