You can still develop on a phone after it's jailbroken.  You can also still develop on a phone after it has been unlocked.  The difference is important:
Jailbreak:  You can install applications not available in the app store.
Unlock: you can run the phone on other networks besides it's default carrier (AT&T when in the USA).
Note that you cannot at this time unlock an iPhone 3g running 2.2.1, which it almost definitely will be if you buy it new.  You can jailbreak both iPhone and iPhone 3G.
Also be aware that if you buy a new phone, AT&T will charge you $200 to get OUT of your new contract.  I think that goes down by 10 or 20$ each month, so that after a year, it's considerably less costly to get out of the plan. 
What I suggest is buying a first generation iPhone on ebay or craigslist.  First generation iPhones can all be unlocked, irrespective of whether the previous owner put 2.2.1 on them.  Also they are much cheaper, have the camera and are totally fine for software development.  I was able to find decent first generation iPhones in Seattle just 2 months ago for about $250 - $350 dollars depending on details.   Unlocking/Jailbreaking takes a matter of minutes with QuickPwn, and the phone works great as a development platform.