Use StringRef instead of MemoryBuffer&.

This code doesn't care where the data it is processing comes from, so a
StringRef is probably the most natural interface.