master: Add support for registering shadow masters

This commit introduces a new mechanism for registering shadow masters in
the master server which will be used in future versions.

Change-Id: I050cc9d3fcba8e3b1e1c2a074ff2386239e1308e