Added Debug view to editor desktop, along with a widget to show the engine

Sorry for the high number of commits. Last 4 are small bug fixes spotted in the engine and tests.