Global dipole symmetry, compact Lifshitz theory, tensor gauge theory, and fractons