thrift 0.9

thrift 0.9 support
Update Makefile
Merge pull request #202 from fabriziopicconi/patch-1

thrift 0.9 support added
stun: fix possible memory corruption

	* when processing any STUN packet with unknown attributes
(Reported by Nick Altmann)
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
core: fix compiler warning and a rare mem leak

	* setting the global advertised port multiple times leaked pkg mem
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
Fixed using internal ID for DB updated operations.

Use the DB ID when doing updates instead of the internal ID.
ID "column" can be INT or STRING type.

If using a noSQL backend (via db_cachedb module), the id may be returned as string (by mongoDB).
Reported by Ovidiu Sas
Fixes #173.