Add is_port guards to API functions
Set the enm module as port data for new sockets
Ensure close/1 always returns ok

The close/1 function should always return ok, even if the socket has
already been closed. This better matches with the behavior of other Erlang
networking modules such as gen_tcp.