SERVER-10448 migrate code out of explain_plan.cpp