Senegal has announced the closure of all foreign military bases, without setting a timeline for the exit of foreign troops.