Boost, Disentangle, and Customize: A Robust System2-to-System1 Pipeline for Code Generation