More stability changes

I've been reviewing the Mission Planner flashing code. Modified the QGC code to mirror that mechanism. Adds a little more stability. Still not as solid as Mission Planner, but better. Starting to question QSerialPort implementation more and more.