dialog: fix possible hash id conflict on restart

When restarting the proxy, the auto-generated next_id of each
hash entry is not properly incremented if a loaded dialog happens to
have this same next_id as hash id. This will soon lead to duplicate hash ids.

Reported by miko95 on GitHub.