[IMP] models: improve _mapped_func(), and add parameter 'reverse' in sorted()
[FIX] Report: get_pdf:  don't miss main elements when parsing html

Main elements can have more than one class, thus can be ignored by the previous
naive xpath. This patch brings a stronger xpath.
Merge branch '8.0' of https://github.com/odoo/odoo into 8.0-linux64