[TIMOB-14261] Changed infinite loop warnings to errors and removed hard-coded platform list

This PR fixes two tickets:
https://jira.appcelerator.org/browse/TIMOB-14261
https://jira.appcelerator.org/browse/TIMOB-13088