What do I do to reset everything without losing the jailbreak/unlock? Obviously reset everything in the settings will not work. Is there any other way to clean up?
Restore? Restoring is possible only to the latest firmware right which currently cannot be jailbroken or unlocked right? Cydia says I have only SHSH for IOS 4.1 only.
Then you should restore with custom firmware. If you used jailbreakme.com to jailbreak the phone initially, you'll need to run jbme2pwn. I believe that's on the woowiz repository in Cydia. But keep in mind since you don't have SHSH for 4.0 backed up, there will be risks in this in that if it screws up somewhere, you'll lose the jailbreak and unlock. You could go the safe way and just manually remove all apps and personal data.
Sounds like he may have already used custom firmware then. When you boot up the phone, do you see a normal Apple logo? Along the top of the black background of the boot screen, do you see a thin line of colored pixels? If you answered no to either of those questions, you're probably already pwned, and you can use pwwnage tool to build yourself a custom 4.0 firmware. I wouldn't recommend proceeding until you can confirm this for sure and you've done enough research to be confident in what you're doing, though.
Aha, pineapple means you're definitely pwned already. You should be able to use Pwnage tool to build custom jailbroken/hacktivated firmware for 4.0, then use iTunes to shift-restore or alt-restore. You may just want to wait until the 4.1 jailbreak comes out before selling it, though. Whatever method you use, just make absolutely sure you follow the instructions given exactly.