[TIMOB-17876][TIMOB-17929] Enable apps with 64 bit slice in titanium

Changes for 
[TIMOB-17876](https://jira.appcelerator.org/browse/TIMOB-17876)
[TIMOB-17929](https://jira.appcelerator.org/browse/TIMOB-17929)

This PR also makes additional changes for the following
[TIMOB-17927](https://jira.appcelerator.org/browse/TIMOB-17927)
[TIMOB-18027](https://jira.appcelerator.org/browse/TIMOB-18027)

The variable "c" is `uint` but "len" is `long`. I'm ok with this, but you're comparing two variable types here.