Much faster ID.compareTo

This passes all specs and is much faster than previous implementation.

![image](https://cloud.githubusercontent.com/assets/238667/3420921/2a3f457c-fecd-11e3-95f3-20f3ce8f81d4.png)

Total scripting time drops by a factor of 10, from 16 seconds to 1.85s. 

![image](https://cloud.githubusercontent.com/assets/238667/3420926/8627eede-fecd-11e3-9e2d-476857e5428d.png)