TapeWidget.create_empty_note(): Move the code that computes note number to add_note()
TapeWidget: Update add_note and add_and_focus_note() to support tree structure
TapeWidget: Add 'new child' and 'new sibling' buttons
Merge branch 'tree-structure'
Replace KApplication with QApplication and remove command line handling code
Update imports and signal handling for PyQt5
TapeWidget: Wrap _add_note_button.clicked handler in lambda to prevent 'checked' being passed to it

- 'checked' seems to be a new argument of a clicked signal, added in
PyQt5
MainWindow: Change handling of file dialog results - they are tuples rather than strings now
Use a single, global QApplication in tests

- It didn't work with PyQt4, but does in PyQt5
- Also it brings the test execution time back to what it has been before
upgrade to PyQt5. After the upgrade tests became very slow (~15 s for
~120 tests), probably because Creating QApplication takes now much
longer.
Merge branch 'pyqt5'