Added onDisconnect event to core.socket

Fixes #43