[libc] Add optional::value_or and clean up if_nameindex_test TODOs (#213682)

I went through the TODOs in if_nameindex_test.cpp:
- string::operator+=(string_view) was already present in string.h (added
in #210895), so I removed the append_bytes helper and switched to
operator+= directly.
- I added value_or (const & and && overloads) to cpp::optional and added
a test suite for it in optional_test.cpp.
- I replaced pop_front_or with pop_front returning optional<T> and
inlined the .value_or(...) calls in the fake network policy.
- Updated the CMake dependencies to account for the new optional usage.

Assisted by Gemini.

GitOrigin-RevId: 4616e9bbb9774bd0662ac095359a5d362f449819
5 files changed