Extract common UART functions.

First part of several refactoring commits to accommodate new tools.
This refactoring extracts common UART functions in a new unit.
The only function extracted for now is the open & setup function.
Updates Makefile for multiple targets.

The use of multiple tools imply that the mew Makefile should support multiples
compilation targets. The support is added via complementary rules in the Makefile.
For now it comprises only one target which is the sniffer.
Fixes line control setup.

When setting the line up we retrieved the original options on which we
updated necessary flags. It often led to forgotten flag and a line which
was then not set up properly. In this patch we do not base ourselves on
the original options but instead start from a zeroed structure that we
fill with the only bits to set.