Fixed tabs.
Made some restructuring: SocketManager and SerialDevice were significantly similar, to avoid code duplication I decided to make the following hierarchy:
 - SerialDevice is the base class who has the device descriptor and knows how to read/write/etc.
 - UARTDevice is a derived class that knows uart specific configuration and other functionality,
 - SocketDevice is another derived class that knows socket specific configuration and support server/client socket connection.

Also changed all the user code so that it compiles. Tested, works fine.