Refactored Connection and added it to the CommunicationProtocol project

The same connection class is now used by both the Desktop and Android
projects