Flow of partially molten crust and origin of detachments during collapse of the Cordilleran Orogen