Clean up unicode code in libstd

This is just the cleanup part of PR #12792, without actually adding NF(K)C.