Merge pull request #109 from HackFisher/master

Fort chain undo state test, fix bug, etc.
slight clean up
handling bids/asks/shorts/collateral in pending_chain_state
added market record storage/fetch from chain_database
merge from upstream/master