Switch back from with() to join()->on() because DB::select returns a
Database_Query_Builder_Select which doesn't have a with() -- that's an
ORM construct.  Also fix up some table names.
Integrate PHPUnit and get it running.  It doesn't find any tests
currently so it's all red all the time.
Merge branch 'kohana_3' of github.com:gallery/gallery3 into kohana_3
Revert "Revise URL::query() to use Purifier on passed $params."

This reverts commit e60c355ef4372390851db3bdfee76a4fa79ee031.

It breaks in the case where you pass in a null value because Purifier::clean_html()
turns it into a string which fails the type hint in Kohana_URL::query().
Fix up the phpunit execution code to look like a traditional phpunit call.
Get one test working.  ONE TEST WORKING!
Roughly reshape tests into PHPUnit form.  Almost nothing passes at
this point.
Fix setup/teardown to call the superclass version.  Which is lame -
the framework should not require this extra boilerplate.
Update for validation API changes:
- ORM_Validation_Exception::handle_validation is gone
- Validation::add_error is now Validation::error
We no longer need to make config changes to pick the default image
driver.  Note that this code wishfully depends on GraphicsMagick which
isn't written yet.
Updated for config API change.
ORM::validate() is now ORM::check()