[TIMOB-17704] (3_4_X) XHR onreadystatechange called multiple times

Cherry Pick PR #6228 to 3_4_X

Fixes [TIMOB-17704](https://jira.appcelerator.org/browse/TIMOB-17704)