Add QueryResultSelection hooks

- `SMW::Store::selectQueryResultBefore` can be used to implement a QueryCache
- `SMW::Store::selectQueryResultAfter` can be used to implement a UsageTracker
Merge pull request #557 from SemanticMediaWiki/rfc-555

Add QueryResultSelection hooks