So long as you have your Apps and your contacts on the computer you sync with. Just Restore as a New Phone and when you sync, check only the boxes under each Tab that you want back on your iPhone. With Contacts there is a box on the Info Tab that says to replace everything on your iPhone with info from the computer just this one time.
Do you mean your apps or your app settings (game saves, etc.)?
You simply sync your apps back on after a restore to factory settings. Your game saves will be gone, though. You have to restore from backup if you want them back.
The safest way to maintain your contacts is to back them up in an email account and then sync them back on after the restore to factory settings.
Also, though I don't want to hijack this into the Jailbreak forum, but there is an App called Data Deposit that will back up all your App data to Dropbox for those Apps that you select - not available in the App Store.