WIP: Services v2 (ip-per-service)

DO NOT COMMIT.

This is a work in progress, but I thought I should at least put some of the base parts up for review.  Anyone looking at this probably wants to review commit-by-commit.  The first few commits are relatively independent.

See #1107 for background.

More to do still.