Symmetry classification of uniform states in spin-2 Bose-Einstein condensates and neutron P23 superfluids