Update hqx.js

- using Int32Array() when possible;
- ratio and getImageDataHD being cached after first usage;
- minor optimizations.