[libc] Remove <functional> dependency in syscall_test.cpp

Summary: Create self contained functional header which has a type similar to `std::function`

Reviewers: sivachandra, PaulkaToast

Reviewed By: sivachandra

Subscribers: mgorny, tschuett, libc-commits

Differential Revision: https://reviews.llvm.org/D77948

GitOrigin-RevId: 54d13b5b2d927652429b0538e27dcd28b783a302
3 files changed