Prevent the Document Properties from being empty when the dialog is opened before the file has started loading

Currently when opening the Document Properties during file load, all fields will remain blank, with the following message printed in the console: `TypeError: PDFView.pdfDocument is null`.

This PR adds a promise that is resolved when the data is available, and also re-factors the code slightly to add a `updateUI` function so that the file size is updated once it's available.

/cc @timvandermeij