editor: mark main-window as modified if document is modified
editor: factor out polynomial helper
editor: factor out the painting of a single track
editor: handle palette-changes
editor: handle font-changes the same way as palette-changes