[FIX] ir_model: on a custom model, _rec_name should be 'x_name' if it exists
[FIX] tests: make sure that a failed tests does not leave the environment dirty

When a failure occurs, or when exiting an assertRaises(), the environment
should not contain fields to recompute.
Merge branch '8.0' of https://github.com/odoo/odoo into 8.0-win32