Try to fix sqlupdates for empty installs

Previously, undocumented manual steps were required to initialize
the _appscripts table. Try to work around that :)

1. For entirely new installs, models that have any SQL update scripts
   will automatically get set to a position past the latest update.
2. For apps that have no update script, we now insert an empty record
   in _appscripts, as this makes it possible to apply scripts that
   appear in the future, without giving up the automatic skipping of
   scripts for completely new installations.