REACH-49 Implement a SocketMessageQueue

I've used an approach which is a little bit different from the one which was suggested (but I believe that idea remained the same). Please see inline comments for more details.