Ecuador's former president detained in graft probe