Refactor QueryViews to allow using class types for the field definitions.

* This allows extending the concept in a clean way.
* Use zope adapter to lookup a view controller used for looking up the result
for a specific query. Its responsible for generating view keys and parsing
results.
Fix problems with reversed view order and key ranges in emu database.
Working example of a version field of the query.

* Simplyified the view definition. reduce() function ended up not being used.
* Integration test checking that the results play out well.
Query can optionaly set the attributes on the resulting docs. The value is
taken from the view index.
Go back to keeping the list of defined fields of the view.

Turns out its important to know it, because the first field is used for
full range query if no condition is defined.
Simplify specifying a view controller to be used for the whole view
instead of each field seperately.