California man gets life sentence for fatal synagogue attack