Hmm, some very quick testing reveals that caching does reduce the number of times `getSinglePixelWidth` is computed *considerably* in some files. However in other files (e.g. tracemonkey), caching has no effect at all :-(

This makes me question if this PR is really a good idea, since it could negatively impact the rendering performance. This probably needs more testing before we move forward with it, but let's discuss this further tomorrow.