You can back up all your itunes stuffs by syncing with itunes. As to the cydia stuffs, you can purchase pkgbackup and back it up,then sync with itunes.
To preserve your baseband , you have to restore to custom firmware created by pwnage tools 4.1.2. Do restore to 4.0, it is too slow, and i can guarantee you that you will revert back to 3.1.3. If you want the new ios , go with 4.1, 4.2 is out but no jailbreak yet, it will be very soon. If you want to wait till the 4.2 jailbreak is out, it will be a much better option.
You could go to 4.1 with sn0wbreeze, but I don't recommend Sn0wbreeze on iPhone 3G. So I would recommend PwnageTool. If you have a Mac, download it and create a custom 4.1 fw (need stock 4.1 ipsw downloaded). Then just option+restore to it after setting device into DFU mode with PwnageTool.
As for Windows, you'll have to find a custom 4.1 fw made by PwnageTool either on the web or from someone here on MMi who can do it for you. If you ever find eyeRobot, he can send you one as long as you ask nicely and thank him
After getting the custom fw, you'll want to use Redsn0w 0.9.6b3 to put your phone into DFU mode. Then shift+restore to the custom fw.
It is safe to update itunes to the latest. If you want to go with ios 4.1, i can give you the custom firmware and you have to download redsn0w 0.9.6b2 and the stock fw of 4.1 as well.
Run Redsn0w and browse to stock 4.1 ipsw. Check mark the last box that says DFU mode only. Do your count, if you do it wrong, do it again until you see a message that says DFU done.
Now at this point open up itunes and Do the Shift + restore to this custom fw of 4.1 which i will include in your Private message box.
Edit : This copy is activated, so you will have to install Ultrasn0w to unlock in order to get service even if you are with ATNT.
So I downloaded all the software. Followed the instructions and now my phone is at 4.1 but I lost all my apps. I did purchase the back up app from cydia and used it prior to doing all this.
in iTunes, it asks if I want to restore from back up. will that bring all my apps back?