Link ids were being used interchangeably with the mavlink channel for
the link. Link ids handed out as a numerically increasing integer. Once
the counter went past MAVLINK_COMM_NUM_BUFFERS all hell would break
loose and cause memory corruption.
The goal of this first installment is to organize the code a bit so it's more readable,
clean up a bit of left over cruft, and manage link configurations (and links in general).
Plus a large number of other changes to allow for orderly shutdown of
objects without crashes or asserts. This is need for unit tests to
create/delete global state around every test.
Centralize all connecting and disconnecting of links through
LinkManager::[Connect|Disconnect]Link api. Connect/Disconnect no longer
allowed through LinkInterface. This allows creation of new
LinkManager::setConnections[Suspended|Allowed] methods to disallow
connections as needed.