Improve libc symbol interface and add destructor

This commit adds a *_DECL macro which builds the libc call declaration
using the returned type and signature defined on a per OS basis.

Signed-off-by: David Goulet <dgoulet@ev0ke.net>
Initial import of thread safe design proposal

Signed-off-by: David Goulet <dgoulet@ev0ke.net>