Improve handling of already-closed sockets
Improve handling of already-closed sockets

Passing an already-closed socket to an enm API function now results in
{error,closed} rather than a badarg exception. Add tests for these cases.

basho/enm,linearregression/enm,walkr/enm,linearregression/enm,walkr/enm