Reprises pull request #1, but built on top of previous changes to merge the atlassian-hibernate-extras-2.x branch up into master. I've also reformatted the code to use brace-on-newline style, since that's apparently in vogue in these common libraries.
This change upgrades the Hibernate version for atlassian-hibernate3-extras from 3.2.7 to 3.5.6. It's expected to be paired with changes made to Crowd to bump its Hibernate version to the same.
While I was making changes, I cleaned up some code duplication and other noise in some of the old classes. They should all be functionally identical to how they used to be; I've just made changes like using utility classes to close ResultSets and Statements, removing noisy "final" qualifiers, etc.