Introduce osmo_gettid() API

This API wraps conventional gettid() linux-specific API, which even in
Linux itself is sometimes not properly supported/announced.

This API also allows future porting to other platforms if needed, and so
far falls back to getpid() if no gettid(9 can be found.

Code ported from osmo-trx.git, see commit 7a07de1efd4eb7cc11c33d3ad25cb2df70aa1ef1.

Related: OS#5027
Change-Id: Id7534beeb22fcd50813dab76dd68818e2ff87ec2
diff --git a/include/Makefile.am b/include/Makefile.am
index 8dae3d9..f0742d5 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -53,6 +53,7 @@
                        osmocom/core/strrb.h \
                        osmocom/core/talloc.h \
                        osmocom/core/tdef.h \
+		       osmocom/core/thread.h \
                        osmocom/core/timer.h \
                        osmocom/core/timer_compat.h \
                        osmocom/core/utils.h \