File upload exception handling (and threading)

The code that uploads measurements is now started using Task.Run from
TPL instead of using the Thread class directly.  Related, exceptions
that are thrown by the upload process is now properly routed to the
unhandled exceptions code in the main application (logging works for
these exceptions now.)

This means that the file upload code is now run on a thread that has the
same priority as the main UI thread, instead of a low priority
background thread.  This is not as cool, but at least exceptions thrown
by the upload code is logged properly.

If we want to have a different priority for the upload code, we should
extend a new TaskScheduler class.

If we want to run the upload process with a different