This patch ensures that everything related to headings is undoable
with a single Ctrl+Z. It also adds tests for the following use cases
(ensuring those are undoable with a single undo command):
- Make line a heading
- Creating a newline after a heading
- Merging a heading and non-heading line with Delete key
- The same, with Backspace key