Updated rat configuration and a bunch of sonar fixes.

The sonar fixes were an attempt to locate an issue that creates to many open files while running junit tests.
19 files changed