Refactored editor code.

Now the editor is a panel. Dialog and frame classes add it to window
content, and handle exit behaviour.

The code compiles, but is currently untested and definitely won't work
properly for sorting.
Fixed false positive plugin highlighting in editor.

This was an existing issue, unrelated to code refactoring, wherea plugin
selecting a plugin could bold the previous plugin's list entry even if
no changes were made. Also fixed incorrect priority values being
displayed on initialisation.