Though the timing of an operation to free hostages in Colombia was unrelated to John McCain’s visit, the events helped the candidate highlight his foreign policy credentials.