Add Gradle task to generate JavaDoc. Fix JavaDoc warnings.