[IMP] enable loading custom models/fields and views from module data files

Loading views for custom models from module data files was not possible because
custom models and fields were introduced into the registry after all modules
were loaded.  As a consequence, the view architecture did not pass the checks.

This patch takes a different approach: custom models and fields are loaded
early on in the registry, so that views can be validated.  The trick is to take
special care of relational custom fields: we skip them if their comodel does
not appear in the registry.  This allows to install and upgrade modules that
create/modify custom models, fields and views for them.
[IMP] registry loading: setup models only if necessary

When loading the registry without any module installation/upgrade, models are
set up once instead of twice.  In other cases, models are always set up before
installations/upgrades.
Merge branch '8.0' of https://github.com/odoo/odoo into 8.0-win32