Add sonar.
Add jacoco.
Fix issues reported on Sonar.