I think it might be possible to add a schottky diode between the FTDI +5V and the socket pin on the FTDI connector. That should allow programming as well as terminal output while the battery is still connected to VIN, and the FTDI would provide the +5V through the diode if no battery was fitted.
Mark.