What I don't understand: If you are detained for several hours, why don't people call a lawyer? Why did he speak to the police (end even the FBI!) without legal counsel?
Alright. It was a genuine question - ok, they said you weren't detained at the beginning, but the moment you were forbidden to use the phone and the door was guarded you effectively were. I'm just surprised that didn't trigger the "I want a lawyer/I will leave now" impulse. But I admit to not having been in the same situation myself, especially not in a dangerous country like the USA.
The symptoms you described are most probably caused by an extreme low blood-sugar level - combined with the stress of the situation, you were close to collapsing. Or it was simply shock, dangerous as well. I was glad when not reading about that collapse.
Edit: Just to make that clear - the situation wasn't your fault regardless, didn't want to imply that (just realized one could interpret my comments that way). Absolutely unacceptable treatment by both the airline and the police.
It sounds like the best course of action is to just have an attorney present if a situation like this happens again. You knew you were being detained, no matter what the authorities said. As far as I know, there are no provisions anywhere that forbid you from having a lawyer present when and wherever you want.
I often see "have an attorney present" arguments, but they make me wonder - can you really afford to have an attorney on retainer if you're not independently wealthy? Or is it as simple as calling a plumber and asking them to come over?
Should I shop for an attorney and keep their contact information with me just in case I might need one?
Will the attorney be willing to come over at a moment's notice if I've never used their services before?
I suspect it is like any market. Some will be there within the hour, some will need ramp-up time. However, regardless of the attorney, I would suspect that any criminal defense lawyer would be able to effectively navigate the particular situation at hand. If it were me, I would tell them they can arrest me and charge me, or let me on my way. I would be shocked if the results of this finicky machine are admissible in court (given that polygraph results are not). Does anyone know whether or not that is the case?
It's easy to say that in retrospect, but at the time I would probably think that the questions will end in just a few minutes and I'll get on your flight eventually... So why involve a lawyer and make this an even bigger deal.
Not on speed-dial, but I would not need too many calls to get one.
In that situation, you don't need to have him on speed dial. It's enough to stop talking and demanding one and you have to be given the opportunity to call one (in my country including internet access for research) - it was my understanding the the US justice system has the same rules.