Energy provider interface, attempt 1.

This is the first attempt at designing an actual interface for #1482. I thought you could convert an issue to a pull request, but apparently not. Please discuss the API in #1482.