replace foreach(dchar; s) loop with explicit for+range

- Using foreach (dchar; string) results in a runtime
  call to _aApplycd which is a less optimized decoding
  routine and invokes the foreach delegate for each dchar.
cast dchar to uint for decimal NCR
Merge pull request #327 from dawgfoto/fasterEscape

replace foreach(dchar; s) loop with explicit for+range