Fix up lock and unlock query code.
Fix get_max_weight() query to default to returning an object.
- Fix DB::select() syntax in _build_relative_caches()  (if you use an array it considers them to be aliases)
- Convert some queries to return objects
- Tweak flow layout slightly in save()
- Drop original_values from valid_field callback - sort_column doesn't need it, I was wrong about that.
- Switch from "decimal" to a regex since the decimal callback is overly constrictive about the number of digits to the right of the decimal
- DB::select doesn't have merge_where so inline that logic
Also reload columns for Item and AccessCache models after adding/dropping columns.
Fix add/remove relationship calls to specific the alias.
Merge branch 'kohana_3' of github.com:gallery/gallery3 into kohana_3