Maid 336 socket service

Socket service based on sessions re-factored. Also socket data transfer for Actual connections and Expected Connections are integrated. Test cases for testing the sockets are implemented, but can be run only locally by changing the configuration in test/Config.js, testSocket value to true.