Add caching routines to Mercury

This PR adds routines for caching Mercury responses. Currently only the default caching is used (1 minute), for dynamic pages and 1 month expire expire for the static assets. Everything else is disabled.

The function which, sets the headers and most of the test cases are ported from MW. :seedling: 

/cc @macbre @michalroszka