It won't work on O2 because it will be locked to AT&T. You could unlock it of course.
That'll be fine, as I'll be using it with a different provider...
However, if I want to re-lock it to activate on iTunes - would I be able to lock it to o2 - or would it be in the hardware that it's an american one, and only be on AT&T?
I think this might be the case, and if I buy an unlocked one off eBay, I'll be pretty much stuck if I do decide to go onto an o2 iPhone tariff...