Precompute @hash in native extensions.

Otherwise if you call .hash later, it incurs a call to .pack,
which is slow. The Ruby versions have always done this, just
the native optimizations were missing it.
Be sure to call packed_string.hash, not self.hash.

self.hash returns the right value, but unfortunately does it by
calling self.pack.
Merge pull request #186 from nearbuy/precompute_hash

Precompute hash in native extensions