Fix FIONREAD related issues

* Network stack socket module: socket_control(): The FIONREAD argument
  is int, not ssize_t.
* Net kit: getsockopt(): R5_SO_FIONREAD: Fix ioctl() argument. Was
  taking a pointer of what already was a pointer to the buffer.
* libedit: el_gets(): The FIONREAD argument is int, not long.
FIFO: More correct locking when accessing file_cookie::open_mode
FIFO: Implement FION{BIO,READ}, B_SET_[NON]BLOCKING_IO ioctls
FIFO: Handle user reads/writes more correctly

* Determine whether called from userland or kernel.
* Check the buffer address via IS_USER_ADDRESS(), if from userland.
* Simplify things by merging UserRead() with Read() and
  UserWrite() with Write().
Style fix.

Sorry, working too much on WebKit code these days.