Properly support cross compiled builds

The default Hash implementations aren't always invariant between
architectures, so we're defining our own trait. Indexing operations are
also carried out in u32 instead of uint as well.

Closes #9