URL consistency fixes NEEDS FURTHER TESTS

fixes #1765
fixes #1811

- in res.url ghostRoot becomes relativeUrl, and path is removed
- moved body of url helper to config.path.urlFor, which can generate a URL for various scenarios
- refactored invalidateCache into cacheInvalidationHeader which returns a promise so that url is generated properly
- moved isPost from models to schema, and refactors schema to have a tables object
- deleted posts now return the whole object, not just id and slug
- frontend controller now uses urlFor, all urls are correct
- frotnend controller rss and archive page redirects work properly with subdirectory
- removes {{url}} helper from admin, and replaces with blogUrl and adminUrl helpers