Add upgrade history only if the database is known to be fully set up

Adding upgrade history entries requires that the tables have been
created and ACL'd, and that the coredata have been inserted.  'init' is
not the only way to be prior to that state -- the create and ACL states
can be run by hand, for instance.

Instead of assuming that the database _is_ sufficiently configured,
assume rather that is it not, and thus default to not logging upgrade
history attributes.  Only in cases where InitSystemObjects has already
been called (upgrades and non-coredata insertions) do we have a
guarantee that the database is sufficiently configured, and thus enable
upgrade history logging from then on.
Enable upgrade history logging for all non-RT database changes

There is one further condition, in addition to those in the previous
commit, under which we can be certain that the RT database is
sufficiently configured; namely, in the case of database changes for
extensions.  While logging for 'insert' actions in extensions is already
covered by the previous logic, 'acl' actions were not.

Explicitly connect and set up system objects when conducting database
changes for extensions; this then allows database upgrade steps to be
logged.
Merge branch '4.2/version-history-bootstrapping' into 4.2.0-releng