[Testing] Use is_detected for StringMapEntry ostream check (NFC) (#159954)
This patch replaces a std::void_t-based detection of the streaming
(<<) operator with a llvm::is_detected-based detection. This way, we
don't have to roll our own SFINAE logic and fallback mechanism.