Update String code for Java 7 compatibility.

Scalang uses unsafe operations to avoid String copies. This adds a unit
test for term decoding and fixes a bug when using scalang with Java 7.
Merge pull request #31 from pkwarren/java7_compat

Update String code for Java 7 compatibility.