Improve host_is_master check in baseldap.py
ipa-replica-install on_master check refactoring