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.
(cherry picked from commit b7c3686c176e7c15b806e50f9743ab91656a8da3)

Conflicts:

	modules/dialog/dlg_replication.c
dialplan: fix shm leak when parsing invalid regex

Upon (re)load, if the subst or repl columns contain expressions which
fail to compile, OpenSIPS will leak shared memory.

Reported by miko95 on GitHub
Closes issue #307
(cherry picked from commit 72028d26bef361b6c99f6ad3653f0e1dbb07c767)
(cherry picked from commit f57025fa90431ae080a91d54ae92564b919da52f)
core: fix mem statistics when DBG_QM_MALLOC is on
(cherry picked from commit ffb0cb6d2c3a224ce37b575a7f956cfa881bf63b)

Conflicts:

	mem/q_malloc.c
db_text: fix issues when database file is missing an ending newline

* do not crash if file contains columns only and is missing the ending newline
* do not skip the last row of a database file if it lacks an ending newline

Reported by gergelypeli on GitHub
Closes issue #308
(cherry picked from commit a2172b256fd19aa56b352665a9d598d6a91b36a3)
Fix sending PRACK for multiple provisional replies.

Reported by Giuseppe Cardone.

(cherry picked from commit 3cd6db2be3728e14343697b886cdcfabd4353d51)
Removed useless "ping_interval" parameter.

Closes  #320, reported by @hydrosine .

(cherry picked from commit c529bb142b455a0db87c9661208e9271f912a4ec)
cachedb_memcached: extend the host+port printing buffer
(cherry picked from commit 32f2c2434e99802e90e6166de18ad7523f19a603)
exec: reduce impact of the Shellshock bash exploit

Improve documentation awareness for Shellshock
(cherry picked from commit 2456295ffb23ddbe219c14571ec2e9d34969f5d9)
exec: disable 'setvars' on all OpenSIPS versions

We break backwards-compatibility while improving security
on the larger proportion of existing OpenSIPS installations.
(cherry picked from commit 100ecaf8de390582eab0d6110b6a0f813d7e28a1)