Resolve the local host name before generating the invitation file.
Use our own infrastructure for finding out the local node's externally visible host name.
Let a server explicitly send a notification when the invitation protocol succeeded.
Ensure the invitation filenames do not reveal the secret cookie.

Since filenames could potentially leak to unprivileged users (for example,
because of locatedb), it should not contain the cookie used for invitations.
Instead, tinc now uses the hash of the cookie and the invitation key as the
filename to store pending invitations in.
Execute scripts when invitations are created or accepted.