Made a keystore base class, persistent request

I refactored the keystore code into a base class with abstract methods
for storing and getting keys, and some subclasses implementing these
methods using different backends (object serialization and a database).
I also started working on a request method which retries the request if
it fails
Merge branch 'master' of https://github.com/tenoman/bitbot
Edited test script to test KeystoreFile