Fix ICE from null character

Add checks for null bytes in the value strings for the export_name and link_section attributes, reporting an error if any are found, before calling with_c_str on them.

Fixes #16478
It doesn't look like the iterator implements any contains method. I did change it to use any() though.