Add test suite for Java regex emulation.

This fixes several issues in the regex implementation:

 - Calling match accessors before find should throw
   IllegalStateException.
 - `Matcher.hitEnd` should return true if last match failed.
 - `Matcher.appendReplacement` should return the matcher.
 - Implement support for `Matcher.region`.

Fixes #108