Implemented the Registry-backed Master.

Review: https://reviews.apache.org/r/19383