Adds support for custom primary ID names to the Document object.

This makes the id key of the Document the same as the Primary ID from the table. On tables with custom primary id names, I would always get a key of 'id' set to 'null' on SELECT statements. This prevents the extra null id key.