thrift 0.9

thrift 0.9 support
Update Makefile
Merge pull request #203 from fabriziopicconi/patch-2

thrift 0.9
stun: fix possible memory corruption

	* when processing any STUN packet with unknown attributes
(Reported by Nick Altmann)
(cherry picked from commit 70d282354c59cb1882fa2101fa44a54375b7b7dd)
Fix bug in fetching all values of a RADIUS AVP.

Using AVPs from script, you can now retrieve all the values (not only yhe first value of the RADIUS AVP).
In order to maintain backward compatibility, the fetch_all_values module parameter was added - by default is off.

Reported and tested by John Quick.
core: address several advertised address related issues

	* properly duplicate buffers into shared memory when required
	* keep the advertised address of the first branch as a default for
	  future branches
	* also allow set_advertised_port() to receive any kind of parameter
	  (int, string, int pvar, str pvar...)

Credits for reporting and helping with troubleshooting to GitHub user contact2malay
(cherry picked from commit ad92fa6ff6f61073270b311475fb9840361b4f2e)
error.h: add a bug reporting function

Motivation:
	* it seems it can be reused quite a lot

Examples:
	* report_programming_bug("invalid pointer: %p", p);
	* report_programming_bug("we should not process BYEs here!");
(cherry picked from commit 9f7ce76403a5ef5db8e9ac8da355d4955059af55)
core: fix compiler warning and a rare mem leak

	* setting the global advertised port multiple times leaked pkg mem
(cherry picked from commit a99688e9bb801fae28a009174b7145688a8b204a)
script statement thresholds: ignore certain statements

Motivation:
	* could lead to behavior such as:
		"ROUTE, IF, ROUTE, IF and IF took too long..."

	* ignored statements: ROUTE, IF, WHILE, FOR_EACH
(cherry picked from commit dee5b3fc278500efe49289f77a0f802805e8d626)
Fixed using internal ID for DB updated operations.

Use the DB ID when doing updates instead of the internal ID.

(cherry picked from commit d871bc972a4294d0b3ee66eb87a87a811b890659)
Fix compile error following the backport