Merge pull request #39 from geekwright/master

Session handler converted to Doctrine, plus a few reverts and a little visual sanity for admin section.
Merge remote-tracking branch 'upstream/master'
Fix Issue 44 - Error building Query in groupperm

An empty CriteriaCompo resulted in an empty clause being added with the specified condition. This produced a syntactically incorrect query. In this case, it began with an empty array of groupids passed to the Groupperm handler, but the circumstance could occur in other cases.

The test cases were also run against a 2.5.6 system, and the resulting SQL was functionally equivalent, so the behavior as changed appears correct.

Also includes a couple of other small fixes in object classes for issues discovered while diagnosing the CriteriaCompo issue.