California teachers unions lose major tenure case