Updated database code

BaseDB is no longer an abstract base class; it implements a generic
wrapper on the Django model it's instantiated with. Also added a TradeDB
class to interface to the database containing historical trade data