Merge pull request #221 from nikbyte/master

Fix some PgSQL schema issues
(cherry picked from commit 671a5bb7af35833fbf1e634e8bd321417ef5aa6a)
Postgres schema regenerated.
db_unixodbc: deallocate the results only after they are processed

	* closes bug #622 on the SF tracker
(cherry picked from commit d63ee19a8961b6019eda067c0b439f09d8126901)
Fixed bogus test on memory allocation.
db_text: properly initialize memory when caching tables
(cherry picked from commit 204d08bb18110599317324fefbd64ecc77e6784f)
Fix reusage of proxy_l structures.

As proxy_l structures contain information about the DNS-based failover (iteration in he struct, which SRV or NAPTR records were used or not), such structure cannot be used more then once for sending a message out.
Fixes:
- do not use the same proxy_l for multiple functions in script (remove the add_proxy() and find_proxy() )
- avoid using the same proxy_l structure for all the calls of same function (when proxy_l is a function parameter)

Fixes #224
Many thanks for Chris Maciejewski ( @l7s ) for support on troublehsooting this.

(cherry picked from commit f7f2cb41d6f562d0c3d6748a827d55e12cb05174)

Conflicts:
	action.c
	proxy.c
Fix DB_BIGINT support and unused vars.

(cherry picked from commit 611d47f5ac3ed36bcf3cfa233e25586b29616e88)

Conflicts:
	modules/db_berkeley/db_berkeley.c
Support for json-c ; Fixed compile warnings

(cherry picked from commit e481ef3895c5cc679ae94676e433a3b522c8b95f)

Conflicts:
	modules/json/json.c

(cherry picked from commit b1ac844e616064666ec807b08c3407f7fb113a24)

Conflicts:
	modules/json/Makefile
Fixed compile warnings

(cherry picked from commit 5c27f464f78235d70414661721470e8213624f5f)

Conflicts:
	utils/db_berkeley/bdb_recover.c
event_rabbitmq: replace exchange with routing_key

Closes #220

(cherry picked from commit eb233f894b1364d20e1f3461304d79a077102a3a)

Conflicts:
	modules/event_rabbitmq/event_rabbitmq.c

(cherry picked from commit 5ea61c0e085dd4398717d1810773ef89446470dd)

Conflicts:
	modules/event_rabbitmq/event_rabbitmq.c
When loading new dialogs at runtime ( via dlg_db_sync MI ), also run the load callback ( eg. used by the acc module to write proper CDRs )
tls: allow free(NULL) with DBG_QM_MALLOC enabled
(cherry picked from commit 99b049b1a04e3619e0aedde45a2209972e299d9c)