Angular.JS - Embed a socket.io in a Factory