If you get an IMEI unlock, you do not need to restore. Once jailbroken, get SAM from Cydia (http://www.bingner.com/SAM.htm) and run it, Utility tab select deactivate the phone. Kill SAM in task manager.
Plug the phone into iTunes to reactivate - YOU MUST have a sim in it to re-activate. The unlock will attach.