Bug 966911 Part 1: Improve DOMString and AString conversion code paths r=bholley