Common source

This is a refactored, documented version of the Javascript API that works for both Rhino and DynJS. The public facing API has not changed, but the implementation has been quite a bit rewired. Keeping the DynJS and Rhino projects in sync is hard, and we may want to consider making the JS bits a module of their own that both mod-lang-rhino and lang-dynjs both depend on.