[MERGE] merge from trunk
[IMP] refactoring of readgroup method.  It should have the same functionality, but is much simpler.  This is necessary to implement eager groupby (orm.py)
[MERGE] merge from trunk
[IMP] refactoring of readgroup method, to make it eager.  Still incomplete, but it is mostly working (orm.py)
[IMP] refactoring of readgroup method. The work is pretty much complete with this commit. Now, it correctly fills in empty group using _read_group_fill_results (orm.py)
[MERGE] merge from trunk
[FIX] only fills groups with empty groups in read_group when in lazy mode to prevent weird stuff happening with the read_group_fill_result algorithm.
[FIX] work around a read bug: false data are fetched when the same field is present multiple times as a field parameter.  The solution is to make sure the list many2onefields does not contain duplicate fields (orm.py)
[FIX] fixes read_group so that it uses the correct _count attribute in the result dictionary (orm.py)
[FIX] when using readgroup in eager mode, there is a possible name collision when grouping on several fields with different intervals, for ex, date_deadline:month, date_deadline:week.  This commit resolves the issue by changing the keys 'field' into 'field:interval' (for ex, date_deadline:month) in the results (orm.py)
[MERGE] merge from trunk
[FIX] fixes a read_group test to use the correct field:interval key when grouping with an interval, and makes sure the sql request properly quote the order statement (without quoting DESC or ASC) (orm.py)
[IMP] puts the closure 'process_groupby' in read_group in a separate method. (orm.py)
[IMP] moves some internal function in read_group to become class methods and slightly reorganize them (orm.py)
[IMP] adds a test for the new eager/lazy functionality of read_group
[FIX] add context parameter to various helper methods to avoid stupid crash in read_group (orm.py)
[IMP] removes useless calls to field_get and replace them by self._all_columns in read_group method (orm.py).
[IMP] improves the helper function _read_group_format_result so that it is slightly faster (orm.py)
[IMP] add and fix the documentation on some helper methods in read_group. (orm.py)
[IMP] change the regex matching orders in orm.py to accept field:interval.  This simplifies the code in _check_qorder (no need to compute the raw field name)