Try shutting down your phone completely and open your contacts.... They will still be there. Safari isn't staying open when you kill it in the task manager. Instead, it keeps a record of your current state (which pages are open; how the tabs are arranged, etc updated in static RAM. (just like you don't loose iTunes music or photos from your library when those apps are closed down). When you relaunch safari, it will read the file containing the last known state of the app. It will then reopen the pages and tabs you were on when you killed it in the task manager.
Killing an app in the task manager will release the RAM that it is still using and allow other apps to utilize it If you don't want any of this saved; go into settings->Safari and turn private browsing on. It will no longer keep track of where you are, and relaunching after killing the app will bring up whatever you have set as your home page (or nothing if you have not set one up)
As for replacing your phone; if it's just the battery / overheating that you are experiencing, you could replace it a hundred times. If you reinstall with your current settings / apps, you will not eliminate the problem. From the experiences of users such as myself; who received replacement phones early on (I had mine replaced last week) it's known that new handsets don't fix the problem. It is SOFTWARE based and Apple is working to diagnose and fix whatever bug(s) are responsible.
This same type of problem came up when the iPhone 4 was released. It took a week or two for Apple to identify the cause as a bug in push notifications. It took another week or two before they had tested an OS patch and released an update to correct the problem. I suspect a similar scenario this time around; but wit a different root cause.
Instead of getting worked up over the problem; try a little patience and give AppleTechs a chance to diagnose and fix the problem.
If you are unable to cope with any early bugs / glitches; then you should NEVER purchase any product (hardware or software) until it has been on the market for a little while and see if any problems have been reported. If problems have been detected, wait until a fix is officially released and verified ... Then make your purchase.
You will always be taking some chances when you purchase the latest leading-edge products. At least with Apple; their glitches haven't led to massive nationwide outages or complete loss of a users data; like other phone platforms have.