Added support for query databases using slugs in URLs

Removes need for hashing entry ids etc and cleans up urls. URLs can now
take the form
"http://www.acalanesblueprint.com/a/article_slug"
Also added boilerplate for other queries e.g. images, users