Added a JS document model

Added some code (pgPdfDocument, pgPdfPage) that creates a javascript
“model” of the document that is rendered and saved all at once in the
objc code instead of being built one piece at a time.