Teach ORMTable to use sequences

ORMTable should not depend on Database::insertId()
without using Database::nextSequenceValue() for
portability.

This is probably a partial fix (beginning of the
way, really) and does not solve fully all issues
related to this bug, I suppose.

Plus it's MySQL/PostgreSQL only -
ORMTable needs to figure out how to treat Oracle
anyway.

Bug: 43475
Bug: 37601

Change-Id: I5d68ce327261f897a774993c165e8161e654b2c6