Harmonized Trading and Contracts

Trading and Contracts now interact and rely on each other, instead of
merely being separate demos. Corresponding increase in generality.

Trading with contracts having more than 2 states have not been tested as
much as those with simply 2 states.