declare the global $SDB connection earlier
Merge branch 'patches/separate-sessions-db' into MOODLE_26_STABLE-local