i don't know about your phone, but I have the X10 and this is not possible. The X10 comes with a Lithium Polymer battery which is very dangerously sensitive to overcharging. Because of this the phone has built in charge circuitry which will prevent the battery from charging past 100%. When it reaches 100% charging shuts off and does not begin again until the charge drops to about 95%. Because of the need for this protection, the phone is not capable of being charged while off. If you plug in a charger while it is off, it will boot up.
For this reason, an app to do what you ask is not possible on the X10 and likely will not be safe to implement into android without huge liability concerns regarding some phones. If you'd like to see what happens when you overcharge a lithium polymer (lipo) battery, log on to youtube and search for "lipo battery overcharge"