Volkslogger igc download: create Logger.cpp

Create Logger.cpp which holds the main functions to
make Volkslogger igc file download possible from
xcsoar.
The feature is not yet activated. See separate patch
which changes the DeviceRegister (Register.cpp)
vlapi: SendCommandReadBulk() shift baudrate parameter

Shift baudrate parameter next to Port parameter, because
the two belong together and resolve an ambiguity problem
in the next patch
vlapi: add documentation to ReadBulk functions

Add some api documentation
vlapi: SendCommandReadBulk() implement optional longer timeout for first char

When downloading the binary log from the logger it is necessary to
wait a longer period after the first ACK is sent to the logger until
the first char is received.
This is because the logger starts calculating file security before the
first byte is sent. This may take several minutes.
The additional parameter needs to be implemented in ReadBulk() and
subsequently also in SendCommandReadBulk()
vlapi: readdir() change return type to return read data length

This is necessary since we need to pass the length of the read data to
conv_dir() in a later patch.
vlapi: download signature with standard IO rate

Testing has shown, that a download with bulkrate is not possible for
downloading the file signature.
Standard rate of 9600 baud has to be used at all times.
The download of the main log data however supports bulk rate.
vlapi: overwrite checksum in ReadBulk

When the Volkslogger transfers serial data FROM the logger
via the ReadBulk routine it receives one character at a time.
For each char received, ReadBulk() updates a checksum which
is of CRC16 CCITT type.
The last bytes sent from the Volkslogger during a transmission
are two checksum bytes and an DLE(escape character) followed by
ETX (End of data).
The command characters DLE and ETX do not get written into the
data buffer. They terminate the receive loop.
The checkum bytes however are appended to the data buffer.
The CRC16 checksum which was updated with every (non-command)
char during the whole transmission should be zero after being
updated with the two checksum bytes.
This is done in ReadBulk() after the receive loop and if a
transmission error is detected (crc != 0) the function is aborted.
In case of correc transmission the function is left returning
the number of read data bytes minus the two checksum bytes
(nbytes - 2) in the buffer.

Beforehand the whole reserved buffer space was initialized
with 0xFF. Now it contains the databytes followed by two checksum
bytes which are not needed anymore.
The returned count of read data (nbytes - 2) should take care of
the checksum not beeing interpreted as data.
However this is not the case in conv_dir().
This function is fixed with one of the next patches. However to
avoid the CRC-bytes, which are of no further use after the correct
reception is checked, from doing further harm in this patch the
checksum bytes are overwritten after checking.

As said: with the fix conv_dir() patch it works without this
measure but this patch cleans the buffer of the CRC bytes anyways
just to be sure and make the buffer contents easier to interpret.
vlconv: fix conv_dir()

Testing has shown, that the function conv_dir() as it is does
not contain a valid condition to end the parsing loop of data
in the buffer.
Reasons might be a change in the api in the past, or (less likely)
the Volkslogger used for testing having a different protocol than
the api expects.
Some hints in the code point to a not finished work in the past
which left the code not working.
The exact details of the volkslogger protocol are not known,
so it is not possible to tell why this is the case.
The working solution to the problem is to pass the number of chars
in the buffer to the function and stop parsing after all data was
processed.
vlapi:Replace new/delete by std::vector

The line with delete[] caused a segmentation fault.
The new/delete[] was replaced by switching to
std::vector.
This allows us to do some more cleanup:
-DIRECTORY structure obsolete.
-Since we have conv_dir() now using std::vector.
The first "count only" call of the function is
no longer necessary.
The original use was to determine the count of
entries so the dynamic array could be initialized
with the correct size. std::vector makes that
obsolete.
-int number_of_flights used in conv_dir() is
no longer necessary
vlapi: Implement Bulkrate

Make Bulkrate configurable from UI.
This Bulkrate applies only to the download of
the actual flight log.
The download of the flight list (called DIRECTORY)
and the signature have to be carried out with
standard IO Rate 9600 baud.
9600 baud is also the minimum bulkrate supported.
vlapi: Enhance progress bar functionality

Create a cyling progress bar.
Since the amount of data is not known before
transmission it is not possible to create
a single progress bar which would run from 0
to 100 %
vlapi: Generate user message to wait for Volkslogger

To make the user aware of the Volkslogger taking time
to calculate file security a message is generated.
Volkslogger igc download: Activate download feature in DeviceRegister

Modify Register.cpp to make xcs aware that Volkslogger supports flight
download.
conv_dir: make caller responsible for clearing the data vector