Factor out boilerplate reducers.

While we are at it, add an update command that combines the
fetch and sync operations.
Refactor to make the devtool package a pure library.