[libc] implement rewind (#191302) Add the "rewind" function defined in the C standard, and adds tests. GitOrigin-RevId: e4b93b70c92ffc581a16578acc2ef58e02824076