Configuration token replacement is incorrect for some topologies

HDP configuration tokens are now properly replaced for non co-located master services

Fixes bug: 1223434

Change-Id: I4380db4653ae4ba2c225eda79662b8eac84a55de
(cherry picked from commit c6d5f000de1da3e12d817d482f7268cbbd7aad94)