Scaler cleaning, speedup

- Cleaned some of the scaler functions/macros
- Avoid scaling empty/single-color textures (this happens frequently in some games)
- Apply loop tiling/strip mining where it makes sense (improves performance quite a bit for large (>64*64) textures, sadly those are rather rare)