USB hub with power delivery OR android accessory mode
While the Power Delivery standard exists for USB 2.0, it's barely a year old, and rarely implemented in 2.0 designs which has been around for 13 years now. Considering everyone is moving towards widespread USB 3.0 adoption, you won't see any USB 2.0 PD devices.

The Raspberry PI is easy though. It's half-way designed with backfeeding in mind. The USB ports' 5v is directly (well, through a fuse) connected to the Micro USB power jack. There is no circuitry involved that would make backfeeding an issue (again, except the fuse, which would be useless, and the older models had 140mA fuses on the usb ports). Since the Pi is powered by 5v, and regulated down from the 5v line, everything works as expected, and about 20% of the time you will find RPI projects that deliberately work through backfeeding.

The Nexus Tablet is different. It uses a USB power controller IC that changes the power circuitry from input/charging mode to output/host mode when the usb controller detects a OTG slave device/cable plugged in. There is no kernel module, hack, or cable that allows charging and otg at the same time. Some other devices do, like the Nexus 7 having a kernel mod enabling charging while OTG. Other devices don't have OTG by default, get hacked in, and since there is no active circuitry to allow OTG in the first place, require an external power source for those OTG device. These can most of the time be charged while using OTG, but it is not designed to act as such. Like with everything, Android device hardware varies based on OS version and manufacturer, so there is no universal option.