Implement a new object type for service dependencies.

Fixes #2799