Massive performance overhaul to the editor

Massive overhaul of the editor. A lot more responsive and the code is
cleaner. Most of the changes are in Flai.Editor though