Intertwined symmetry and topology in 3 + 1 dimensional gapped quantum phases of matter