dialog: fix behavior of backup node when replicating dialogs
The node that has a backup state for the sharing tag of a dialog
* skipping the replication of all dialog events
* bypassing all registered DLGCB_TERMINATED and DLGCB_EXPIRED callbacks
This behavior was causing issues when replies and sequential requests did
arrive on the backup node. Eg. unable to match and fix the BYE for an
existing topology hiding dialog.
After this fix, only the acc and cgrates modules will skip all actions in the
above mentioned callbacks if the sharing tag is backup.
(cherry picked from commit 596c39d905dec66c87cf04ac43cac63921c1b7b8)