[IMP] models.py: _auto_init: accelerate row existance check

Using `COUNT(1)` on big table can be slow. Use `min(id)` which use
pkey index to have a quicker response
Merge branch '8.0' of https://github.com/odoo/odoo into 8.0-win32