Loader fixes and improvements

Also fixes issues with CI_Session prefixed subclass extending identified at #353

Includes unit tests.

See commit messages and diffs for details.