Minor cleanups

Also close the file descriptor if we're out of memory.
modules: minor cleanups
modules: cleanup docs
shared library linking now is fine
socket: call next() anyway, no matter what happens
select_event: minor cleanups
update README
build.sh: update for new options