Fix Issue 4483 - foreach over string or wstring, where element type not specified

Infer the value type as dchar, to ensure correct UTF iteration/decoding.

https://d.puremagic.com/issues/show_bug.cgi?id=4483

This is a breaking change with limited impact. Please check the bug for some of the reasoning for this.