Common: Fix a potential infinite loop in StringUtil's ReplaceAll

This is a bug that was recently fixed in the Dolphin git repo. See PR [983](https://github.com/dolphin-emu/dolphin/pull/983)