[TIMOB-17036] (3_3_X)  iOS: HTTPClient state machine fixes

Cherry Pick PR #5775 into 3_3_X

Test is in [JIRA](https://jira.appcelerator.org/browse/TIMOB-17036)

Also fixes 
[TIMOB-17062](https://jira.appcelerator.org/browse/TIMOB-17062)
[TIMOB-17057](https://jira.appcelerator.org/browse/TIMOB-17057)