Common: Fix a potential infinite loop in ReplaceAll

Prior to this change, it was possible to cause an infinite loop by making the string to be replaced and the replacing string the same thing.

e.g.

std::string some_str = "test";
ReplaceAll(some_str, "test", "test");

This also changes the replacing in a way that doesn't require starting from the beginning of the string on each replacement iteration.
Merge pull request #983 from lioncash/lol-str

Common: Fix a potential infinite loop in ReplaceAll
Common: Kill off duplicate log warning definitions

Also embed the log checks rather than using macros
Fix ArmEmitter's asserts from failing to compile.
Changed them all from debug asserts to regular asserts, since they shouldn't only be run at debug time.
Merge pull request #851 from lioncash/logg

Common: Kill off duplicate log warning definitions
Quiet initialization order warning in CFrame
Merge pull request #1007 from shuffle2/reorder-warning-shush

Quiet initialization order warning in CFrame