I had very similar issues to the ones described above, so I am not going to repeat them. It seemed that audio jack was detecting continous plug/unplug.
I live in a humid part of Spain, plus I used my Galaxy Nexus with an arm strap-on to do my workouts, yep, you know what that is like, sweaty.
After trying many things one day I thought maybe the harware pin in charge of detecting plug/unplug was damaged by humidity and/or my own sweat. I had a close look at that first pin just on the right side of the jack connector (screen facing downwards) and it was a little rusty. I got a needle and scartched it... VOILÁ, that did the trick, and I returned to be the proudest Galaxy Nexus owner.
I did not want to publish it here until I made sure it worked properly for a long time. It happened about 3 months ago and still no issues. I stopped using it for workouts, though.
(ok, great smartphone, but crappy audio jack connector)