So, what is the problem with using the ATmega328 chip on the PCB? You can add a socket and the chip, or use the surface mount equivalent as is used on the pro and mini.
Whether you need the 168 or 328 depends on the size of your code. The cost of the two chips is nearly the same. Might as well go for the one with the most memory.
As for how the code gets onto the chip, there are two ways to do it. One is to borrow Harry Potter's magic wand, and wave it at the chip while doing a happy dance. That method is not often successful, however.
The other is to put the code onto the chip in exactly the same way you put the code onto the chip on the Duemilanove.
If it loses power from the 5V is the code erased?
Is it erased from the Duemilanove? No, of course not.