This uses splice on Linux and mmap+write elsewhere to transfer a file to
a pipe. Note we cannot use sendfile because (at least on macOS) the
receiving fd must be a socket.
There is no direct Win32 API equivalent, but calling WM_CLOSE on
the top-level windows allows for a graceful shutdown where resources
are able to clean themselves up properly
Before this commit, LibCore/System.h exposed only part of
System::stat API on Windows. Namely, users of Core::System::stat
had to #include <dirent.h> in order to check the return value of stat.
It is OK for low-level libs like LibCore/LibFileSystem, but
S_ISDIR is also used in LibWeb\Loader\GeneratedPagesLoader.cpp.
We want to avoid platform #ifdefs in LibWeb.