Further caching

The changes here are quite drastic. "Page one" performed 62 queries with the original code, and only 14 with this. After the cache was warm, original code performed 13 queries and this performed 4.

"Page two" performed 82 queries originally, with this 71. With a warm cache, the original code performed 26 queries, this one only 5!

Of course this is all relative to how big your cms setup is, but we would rather cache than beat the db to submission ;) There may be more to do wrt caching, especially things like 71 cold-cache queries, but they will have to wait. Warm-cache counts are almost acceptable now.