Javadoc fixes and CMake javadoc building

Fix some issues with the javadoc (missing periods after sentence etc).
Passing -DBUILD_JAVADOC=ON to CMake will result in the javadoc being built after compilation of the java code.