Create logic-related modules (Closes #11)

Rebased commits:

- Move PDF creation logic to PDFDocument
- Fix invalid JSDoc annotation
- Move dialog logic to its own module
- Use single variable for export dialog template
- Remove const: _ACTION_CANCEL

  Since this constant isn’t used more than once,
  it is not necessary to declare it after all and
  better to just use the exported constant
  from the Dialogs module.