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.