Adds handling for the close_range syscall in Linux. For a contiguous range of FDs, close_range allows either closing them or marking them as close-on-exec. We convert the seen close_range call into multiple close_range calls, one for each contiguous sub-range that does not have any DR-private FDs. We always skip executing the app's close_range itself.
Fixes the file_io test that assumed that there are only 4096 FDs. Instead, we get the rlim_max for RLIMIT_NOFILE and try to use the DR_STEAL_FDS FDs after it to test whether DR's handling of close and close_range is working as expected.
Adds tests for close_range to verify correct happy-case behaviour and EINVAL. close_range does not propagate errors from closing individual FDs; tests that as well.
Manually sets the SYS_close_range constant to __NR_close_range. This is needed because the header with which we updated the DR syscall table defines the latter but not the former. It is still not defined for AArch64 yet, which doesn't even have the NR constant right now. We need to update the syscall defines in uapi.h from a newer kernel version; this will be done in a follow up PR.
Issue: #5131 (closed)