Make dependencies explicit even in essential core files

Add require_once inclusion of their dependencies even to files that are
always included by quearl/core/main.inc.php, to make their dependencies
explicit.

Also include quearl/core/main.inc.php from files that previously assumed
to be always loaded after it.