Add String.hasCode() method.

Added Java's implementation of the String.hashCode() method.