Classifying fractionalization: symmetry classification of gapped Z2 spin liquids in two dimensions