Bus and self powered device using FTDI FT230X
First you should try to understand USB Suspend.  It isn't quite so much "when no data is being transferred", but "when the data lines are idle for an extended period of time".  In my experience, the bus only suspends when the PC is suspended.  Otherwise, there's almost always some traffic flowing on the bus (e.g. Start of Frame markers etc).  Now, there are other types of suspend, but they are generally optional.

So, like Passerby said, you really don't have to worry about not going into suspend mode.  There's always 5V on VBus when the computer is suspended - otherwise, remote wake up would not be possible - and most host controllers don't really enforce the Suspend current restrictions.  If they did enforce the current restrictions, someone's not-quite-good-enough device might work on one host controller but not another, and the consumer is likely to blame the computer/host controller for not working with a bad device, rather than blaming the manufacturer of the bad device.

With that out of the way, the next step you will probably need is something like an auto-switching power mux.  TI has an excellent selection of muxes that will automatically switch between two voltages sources, depending on which are available.  The keyword here is that you don't want self powered or bus powered, you want dual power.  In a dual-power role, these muxes will prefer self power, and only switch over to bus power when there is no self power, and they are able to indicate to the MCU which power source is in use right now.  I haven't used any but I think some are also designed to work with batteries.

http://www.ti.com/lsds/ti/power-management/power-multiplexer-mux-products.page