Made some protocol events use numeric references
Fixed socket.io client type definitions
Use event numerics where required