Bug 1111419 - dmd.py: add a cache for recordKeyParts. r=mccr8.

This reduces the runtime on my Linux machine for one large DMD output file from
235 seconds to 105 seconds.

--HG--
extra : rebase_source : bd567319c1207a09fa47b94571066109de1cc9e7
Bug 1110455 - Add --sort-by=num-blocks option to dmd.py. r=mccr8.

--HG--
extra : rebase_source : 6d6aa87f102ee069f4f5052607463380c656f80d