Switch a custom Arduino between wired and wireless connection
Following Chris' suggestions, here is a multiplexer solution that I intend to try out. When the USB is unplugged, the select lines are low and the Y0 lines are selected which is the BT module. When the USB cable is plugged in, the select lines go high and the FTDI chip gets selected. VBUS and 5V are two separate 5V sources. Only the FTDI gets powered from the USB bus.

ADDED: While I was at it, I thought I could turn off and isolate the BT module entirely when the USB is plugged in. Used a p-mosfet which can handle about 130mA which is sufficient since the BT module itself does not consume more than 50mA.