add spec for closing handle
split return value for void and int types
uv_close socket handles
use pointer types to defer freeing
free memory after closing
fix deallocation for timers