In the months since the election of Donald J. Trump, California has turned into a laboratory of resistance — championing legal, legislative and political strategies to counter Republican policies while pressing the kind of new Democratic policies that presumably will not be coming out of Washington anytime soon.