Fix equality check when documents have a range key, and correct behaviour when documents are used as hash keys

When doing an equality check, the range key can't be ignored - there can be multiple documents with the same hash_key, but different range values. I changed this behaviour and added specs.

Using documents as keys in a Hash did not behave as expected (as hash was not implemented and the inherited implementation does not use the same logic as ==). Also, eql? should be consistent with ==. I added eql? and hash methods to Document and added specs.