context factory support

this is a substitute pull request for https://github.com/mozilla-services/cornice/pull/131 as we no longer have write access to the https://github.com/hotheaven organization…