Moved a bunch of contract-related code from gluon.AnalysisMain to the new class
gluon.contract.Contract.