Improved querying.

- Added prefetching of contract's contractors and contracted.
- Added annoation of category's value and contracts number.

Profiling shows considerable improvement in contracts, entities
and categories pages.