Backport context creation code from 0.8 branch
Backport context creation code from 0.8 branch

0.7 branch is incompatible as-is with ot-types defined in https://github.com/ottypes/. Specifically the ottypes define the type API as a function that returns properties, while 0.7 expects a POJO.
igmcdowell/ShareJS,igmcdowell/ShareJS