Better JavaDocs, en minor refactoring of MortonCode.

Removed some duplication in calculations, and introduced more
consistent naming.