Move Solaris if_fd to local scope.

This variable is never used outside of setup_device(), therefore there is no
reason to declare it in global scope.
Make device close cleaner.
Cleanly remove the device FD from the event loop before closing it.
Add DevicePersistent option for on-the-fly device setup.

This adds a new DevicePersistent option; when it is enabled (the default),
behavior is unchanged. If it is disabled, the device will not be set up during
tinc initialization, but will instead be deferred until the first connection
is established, and it will be closed as soon as the last connection is
terminated. This includes tinc-up and tinc-down calls.

This is useful because it means the device won't be set up until we are fairly
sure there is something listening on the other side. This is more user-friendly,
as one can check on the status of the tinc network connection just by checking
the status of the network interface. Besides, it prevents the OS from thinking
it is connected to some network when it is in fact completely isolated, a
useful behavior especially on Windows.