add gradle javadoc task memory options to fix occasional mem alloc failures on Travis CI
Merge branch '3.x'