Prepopulate document resources

Prepopulate the existing resources of the document into the
DocumentResource that represents it.
Merge pull request #1397 from aadsm/prepopulate-loaded-document-resources

Prepopulate document resources