Run Flow definitions insertion on update.php

When running update.php, the maintenance script will now be run.
Upon completion, it'll write an entry to table updatelog, so that a next run
of update.php will not execute the maintenance script again.

Meanwhile also fixed a small error; $dbw was not tossed in to insertDefinitions

Change-Id: I152405d4b67e21cf14d044d8d5a6151505e03b44