All hostages trapped during a 17-hour supermarket siege in Cartagena have been freed by Colombian security forces after a failed robbery.