Coronal implosions in solar eruptions and flares