script caching fixed for unicode

1. unicode fix for crc-32 algorithm
2. minor tweaks for script caching
3. profiled and works faster (especially on FF)