Make the event data be the master that owns the socket, instead of the socket

Then we will be able to access the master's domains and other info later
on
Add a helper function to find a domain by name within a master