Specified a generic const_arguments method in the contracts module.

This should deal with our cloning problem.  This patch has revealed some other bugs in contracts which were affected by this problem.  This patch does not fix those.