Bug 846542: store current and next image separately in the devices table; r=mcote
Bug 846543: Generalize async operations, use that in the BMM API; r=mcote

This also adds support for asynchronous HTTP requests, and uses those
from the request machine.