Refactor site.go

I've splited it in 3 parts:

- query.go: where the global queries to the DB reside
- site.go: where we have the 1st level function accessed (for example,
  from the templates or the writers)
- writers.go: whatever is going to write templates

In the writers.go part a lot of more work can be done.