unix-socket: separate functionality from the unix socket interface
Currently the unix-socket interface reads from the socket, parses messages and implements the methods to fullfill those needs. This should be refactored to separate the functionaliy from the interface.
This would allow library users to make use of the operations provided by the socket without going over the socket. It would also make it easier for new interfaces to be made to the functionality.