It was always stated that Bremer made that decision, but I would imagine the order came from Cheney or Rumsfeld.
The assessment of training of the new military and police forces in Iraq was done by the Iraqi Security Forces Independent Assessment Commission which was headed by the recently retired Marine General Jim Jones and made up of retired military and LEOs and that assessment was rolled into the Bush withdrawal timetable. General Jones would become Obama's National Security Advisor, and would leave after the Iraq ramp down and Afghanistan ramp up was complete.
After that, Obama would hire the same 3 men to manage Afghanistan that Bush has managing the surge. General Petraeus, General Allen, and Ambassador Ryan Crocker. Ryan Crocker was the first US official to sign the Iraq SOFA, along with the Iraqi Foreign Minister. After which it was approve by the Iraq Parliment, after which it Bush and Maliki signed it.
What you say about Maliki purging was true, but there were a lot of other gruesome things going on at the same time.
What you state is very true, and I have always said the biggest mistake we made in Iraq post invasion was to disband the army and police.
What a disaster he was. I'd like to say that at least we learned a lesson from that fiasco. But we learned nothing from Vietnam. Why should this be any different?