Adjusted refresh_P4ROOT_from_offline_db.sh to work on maser/edge/replicas.
Added logic in functions like p4d_truncate_journal() to make them safe
to call on any host, master, replica, or edge. When called on any host
other than the master, appropriate behavior is expected.