Organically templated rare earth sulfates with three-dimensional and layered structures