Wheel cache lookups become more complex when we wish to allow binary blacklisting. Rather than passing more parameters around, replace cache_root with wheel_cache, and create a wheel cache in all the relevant command entry points.
This won't put wheels into that directory, but will read them if they are there. --no-cache-dir will disable reading such wheels.
By extracting the logic into pip.operations.freeze, the hope is that folks could do a freeze programmatically more easily.