core: Added support for the clang compiler

Support for clang, a C compiler from the LLVM suite has been added.
Install clang and run 'make cfg CC=clang && make' for building. GCC Inline assembly is supported.
TODO: clean warning caused by clang (-Wunused-variable, etc)

(cherry picked from commit 452c543de61d413351a5ac0816adc137d150824b)
Provide inline linkage for non-gcc compilers(like clang)

Inline method in headers should be declared extern.

(cherry picked from commit 2e5145ecdd8368c947ea93b98449ebd997824ce2)
Makefiles.defs: clang compiles to O9

(cherry picked from commit 5273948a6eeb6f6fe878696dce54880cabb0ef7c)
Makefile.defs: compiler optimization level made variable

- allow using -O3 for clang, which gives error on the former default -O9

(cherry picked from commit 0713c0de50f8c2f4da2ee0ef33b0505c37792392)

Conflicts:
	Makefile.defs
core: declared static and extern inline prototypes for gcc (clang) on mac os x
mem: malloc(0) should return a valid pointer for free according to specs

(cherry picked from commit f61ff34aac7c7bae3a96fb698a899c8a0e692a9f)
(cherry picked from commit e605174dab9b86ce06689d184b4b9d81288f1193)
registrar: if rcv_parm value is empty, don't add received to contacts in 200ok reply

- otherwise results in malformed value

(cherry picked from commit 2f213e313a86e16665f6d0acfec959bf23f72b7d)
(cherry picked from commit fc410ae69c6b371538f457947fd3a2946dc492cd)
pkg/debian: updated specs to version to 3.3.6
pkg/rpm: updated specs to version to 3.3.6
Makefile.defs: version set to 3.3.6
ChangeLog: updated for v3.3.6
modules_k/pua: added some missing lock releases (backport)