Fast hash code implementation
From http://stackoverflow.com/questions/113511/hash-code-implementation