nunaliit2-couch-onUpload: Re-factor file conversion code to support
documents from the submission database.

Issue #244