Proposed unit test and fix for issues raised in #599 and #600.

Pro for the test:
* Successfully tests issue #599 across multiple platforms.

Con against the test:
* It can take a long time to run (7s on my netbook); it uses a sub-process for several values of PYTHONHASHSEED.

Hopefully I can keep hacking on this to get a fix in as well.
Can you add a comment explaining what this test does?
(i.e. why the first result should be equal to all others)