added document metadata helper method. Fallback for enmpty Document.versions
Merge pull request #208 from tochman/doc_version_control_clean

Fix for Document version control