Integrated from p4 branch
1. updated scripts for xface.js generation
2. fixed a compatibility issue on iOS7
3. updated js source

[git-p4: depot-paths = "//xFace-Apollo/branches/test_opensource/": change = 16385]