[IDE 1.5.x] Command-line / GUI refactor.

This is a proposal for the rationalization of the Arduino IDE code.
More info coming.