shelve: drop pickle usage
Pickle was used to the `shelvedstate` file. However the content of the file is
very simple and we can handle serialisation ourself. Not using pickle is a net
win.
Note incrementing the format version as no releases have been done so far.
To run the tests, do:
cd tests/
python run-tests.py
See http://mercurial.selenic.com/wiki/WritingTests for
more information on writing tests.