Implement comparison between String and String::Data

These make certain unit tests more clear. Unfortunately they can't be in the unit tests themselves because they need to access private data.