I don't know what the current state of play is with regard to unlocking iPhones running on the latest version of the software, but do bear in mind that if you're looking beyond the fancy UI and accelerometer-based games, much of the network-related functionality is, as the term might imply, dependent on functionality that resides in the network (O2's network in this country).
Therefore, even if the phone works well for non-telephony applications, you won't get many of the features that make it better as a phone - "visual voicemail" and suchlike. Both ends of the connection have to support those, and of course Orange don't, as it needs expensive infrastructure, and they have no guaranteed revenue stream from providing such support.
This is the main reason for the tie-in to one operator: it costs so much to provide the network infrastructure that operators want some guarantee of exclusivity on service provision.
EDIT: Oh, and although you could transfer your number, you couldn't even use an existing O2 sim card without jailbreaking the phone and sacrificing functionality - you have to upgrade and migrate the number even if you're an existing O2 customer, for the reasons outlined above.