Actually AT&T attaches a data plan to your phone if they detect it to be a smartphone. This is even if you go and switch Cellular data to Off in settings.
They were able to do that since they had database of IMIE for iPhones. So if they didn't have the IMIE info (say unlocked phone bought from retail channels), they didn't do so.
It'll be interesting to see if they can detect these new unlocked iPhones.
There have been SIP clients for the iOS for a while now. Been using one for a year. I recommend Siphon, which is available on Cydia, but there are several in the Apple Store too.
(Better yet, can I do the same with a secondhand iPhone purchased from Craigslist that's already filled its 2-year quota?)