Update upload algorithm

The upload application has an updated algorithm for how to find, select
and upload measurement files.

This commit also includes data contract classes for the server API.

The normal scenario pass the unit tests, but there are several tests
that fail.