iphone.aggie's solution is the most secure
an itunes restore is similar to a reformatting of a HDD, it may appear to be wiped, but all the data is still accessible, very easily if you know how (by using data recovery software)
the erase all content and settings will erase all the data, and then pass over it with 1s and 0s to make sure no data is recoverable
and jailbreaks/unlocks etc remain after as they modify the system