GCS Uploader: close com port when booting

Keeping this open makes the bootloader not work further
times.
GCS Uploader: prevent crashes on repeated use

On OSX when using the bootloader multiple times when
unplugging the device between (instead of clicking
boot), the open command locks up the GCS. This makes
it close the previous handle first.

Ideally an unplug event would trigger the close, but
the hooks are not easily available.
Merge pull request #1270 from peabody124/uploader_osx_crashes

Uploader crashes with repeated use on OSX