Detecting and identifying two-dimensional symmetry-protected topological, symmetry-breaking, and intrinsic topological phases with modular matrices via tensor-network methods