vfs: Fix race in fdrop

There is a race window between f_count reaches 0 and we set f_count to
INT_MIN. This race would result in multiple call to fp->close() and
rcu_dispose(fp) if we call them in fdrop().

To fix, we set f_count to INT_MIN using CAS, this way, we make sure
fp->close() and rcu_dispose(fp) won't be called twice.

Fixes #293.

Signed-off-by: Asias He <asias@cloudius-systems.com>
epoll: Check if fileref is valid

epoll_ctl can happpen while someone cloeses the fd concurrently.
Do nothing if fileref is empty.

Saw this happens in tomcat benchmark.

Signed-off-by: Asias He <asias@cloudius-systems.com>
net: Remove poll_wake in sofree

The call chain is:

   fp->stop_polls -> fp->close -> soclose -> sorele -> sofree ->
   poll_wake -> fhold -> fdrop

We set so->fp to NULL in soclose, we do nothing in poll_wake if so->fp
is NULL. So no need to call poll_wake in sofree.

Besides, before we call fp->close, fp->stop_polls will stop all the
polls, so the poll list should be empty anyway.

Signed-off-by: Asias He <asias@cloudius-systems.com>