vfs: file descriptors housekeeping changes
- add support for allocating new file descriptors from the end of the fd range (O_DESC)
- add support for assigning of an already opened file to a free file descriptor
vfs: VFS_OUT_CLOSE is called only when the file reference count is about to drop to zero
vfs: implement VFS_IN_DUP
libc: optimize current working directory housekeeping
- using opendir() was an overkill
- allocate current working directory file descriptor from the end of the fd range using O_DESC (so it doesn't mess with the well-known descriptors 0, 1 and 2)
libc: implement dup2() (via VFS_IN_DUP)
getvc: change stdin/stdout/stderr by a slightly more elegant way (using dup2())