Big update of how bootstrap and Module class load modules
- changed bootstrap to load a preliminary list needed for initialization, then
leave the rest up to the Module class when Module::load_modules() is called,
which includes unit test and third-party modules.
- changed Module class to consider two special modules, set by $_first_module
and $_last_module variables (purifier and gallery, respectively).
- revised Module::_add_to_path() and Module::_remove_from_path() for K3.
- moved module loading in bootstrap before route definition so modules could
override our defaults.
- fixed/added some comments.
Fix K2 ORM calls "or_open","and_open","close" --> "or_where_open","and_where_open","or_where_close","and_where_close"
Fix database config - K3 "hostname" is K2 "host"
Change ORM queries using table names from plural to singular (e.g. "items.id" -> "item.id").
- changed in K3.2 http://kohanaframework.org/3.2/guide/orm/upgrading
- see issue ticket http://dev.kohanaframework.org/issues/4066
Change DB build select call in Hook_GalleryTask to use "id" instead of array("id").
Change Database_Test to put "mock" in compile() instead of build().
Change DB::build()->select(...) --> DB::select(...)
Change DB::build()->update(...) --> DB::update(...)
Change DB::build()->delete(...) --> DB::delete(...)
Change DB::build()->insert(...) --> DB::insert(...)
More changes in DB syntax...
- DB::build()->from(...)->select(...) --> DB::select(...)->from(...)
- DB::build()->from(...)              --> DB::select()->from(...)
-   ->count_records()                 -->   ->execute()->count()
Change remaining 11 DB::build() instances by hand.
Merge pull request #280 from shadlaws/orm_and_db_fixes

Orm and db fixes
Merge pull request #279 from shadlaws/load_modules_20130409

Big update of how bootstrap and Module class load modules