(PE-5594) Move functions and change namespace

Change the namespace of the ring-middleware.clj file to
`puppetlabs.ring-middleware.core`. Move utility functions out
of core.clj and into common.clj.