Set quota _after_ loading functions, or CDB_SetUserQuota is missing

The rebuild_quota_trigger method was rewritten to support setting
quota even for databases that did not switch to "extension" mode yet