For each map reduce task, attmepts to infer bucketing and sorting metadata for the outputs.
Currently only map reduce tasks which produce final output have there output metadata inferred,
but it can be extended to intermediate tasks as well.
This should be run as the last physical optimizer, as other physical optimizers may invalidate
the inferences made. If a physical optimizer depends on the results and is designed to
carefully maintain these inferences, it may follow this one.