[libc] Implement tmpfile and corresponding tests (#213396) Closes issue #191281. GitOrigin-RevId: cff4ca2e51f89c992d8a1b6ce1067846ba680e2e