Fixed 2.11 documentation build

Also fixed the scala custom field constructors documentation, it was a
mess, polluted the global namespace, and didn't have any tests to verify
that the docs did what they said they did.
Merge pull request #2790 from jroper/2.11-docs-fix

Fixed 2.11 documentation build