Change how domain name is resolved to tunnel

The old way was to count (from the right) the levels of the FQN and the Nth part was regarded the tunnel name. This was somewhat intuitive while the server didn't know it's FQN and couldn't report the tunnel's FQN.

This patch also fixes issue #75 (where it all started)