Add copy() method to context interface.
Refactor contexts configuration and serialization in order to support copying of configuration information.