Rework the connection handling of the serial console
We introduce a new way to init a serial console, to connect and disconnect to a serial console.
Therefore we have 3 new functions in the Machine class:
serial_init()
serial_connect()
serial_disconnet()
there are similar functions in the SerialConnection class.
This should make it possible to close a serial connection in a test and
to reopen this connection later.