Currently there is no way to close all the running apps immediately on your iPhone.
But there is a good news for jailbroken iOS users. On phones running jailbroken iOS, AppQuit Activator Actions can be used to quit all running apps instantly. Here’s the procedure.
First get the Activator utility from the BigBoss repo. Then install the AppQuit Activator Actions from the BigBoss repo with Cydia.
Note that after the installation, no new icon will be added to your Springboard. Now you can use the actions from the Activator panel in Settings.app.
AppQuit Activator Actions is now available in the Cydia app store via the BigBoss repository. It requires iOS 3.x+ and the Activator utility.