Add minimal dependency injection, including tests

Not re-inventing the wheel, just a spoke or two. If a DI library is
approved for use on WMF production, that should be used instead.

Change-Id: Ia24d55c43f47b82513a46032434bf81fcde2e18c