Update JUnit and add Hamcrest matchers.

Allows better testing of expected exceptions in unit tests.
A bit of syntactic sugar for critical sections.
Create ConfigurationBeansLoader.

Also dependent classes and unit tests.