Proper shutdownhook

Now properly closes both emitter and socket on hard shutdown. Also
includes latest snapshot of JmDNS.jar.