adding lib/document.js to create custom document.

To create a view: NS.viewDocument.createNode('viewconstructorname');
To create a model: NS.modelDocument.createNode('modelconstructorname');