Made a keystore base class, added some comments

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 added some docstrings and comments in the Mt. Gox API