More deduplication of byte masks.
Expose more methods needed from JRuby proper.