actually use msg_queue in ip.c

msg_queue is defined but never used, hook it up so IP packets get queued instead of dropped when there is more than one.
change the name to ip_msg_queue to avoid naming conflicts.
also add msg_queue for UDP

All other layers in the network stack use a msg_queue to not drop messages, which in this context represent packages.
This finally fixes the random crashes when UDP network traffic is present. Turns out RIOT is not handling lost messages well.
Fix linkage of pthread_reaper_stack
Fix `pthread_self()` confusion

This fixes #755.

The pthread ID cannot be reused as soon as the thread ends, because
another thread needs to join it first. `pthread_self()` uses the native
(i.e. RIOT's) thread ID to distinguish itself. A native thread ID can be
reused as soon as the thread ends, since the core knows no join
operation.

In order to not confuse itself with an earlier zombie thread (i.e a dead
non-detached thread, that was not joined, yet), we need to invalidate
the associated native thread ID.

This approach is sane since a dead thread won't call `pthread_self()`
anymore.
add Makefile.tests_common

Contains common variables for all test Makefiles.
Include from test Makefiles.
Merge pull request #754 from Kijewski/pthread_reaper_stack-linkage

`pthread_reaper_stack` has global linkage for no proper reason.
test: added missing license
remove USEMODULE comments and some whitespace
remove debug target from test_nativenet

It conflicts with an existing debug target
Merge pull request #761 from mehlis/test-pthread-license

test: added missing license
make calloc "usable" early on

closes #741

Old versions of the gnu libc uses calloc to allocate dymanic memory
when some error occurs in dlsym.
This results in a segfault as natives calloc wrapper has not been
initialized yet.
As this is a circular dependency and the libc can cope with this, we
just return NULL from the calloc wrapper and hope for the best.

Recent libc versions use a static buffer instead.
move global char array out of thread

The char msg[] is accessed from outside the main thread after it has
exited, so it needs to outlive it.

Fixes #717
Merge pull request #763 from LudwigOrtmann/issue_717

move global char array out of thread
Merge pull request #758 from Kijewski/issue-755

Fix `pthread_self()` confusion
core: lifo: added the right author
Update libcoap
Merge pull request #762 from LudwigOrtmann/issue_741

make calloc "usable" early on
Merge pull request #740 from authmillenon/update-libcoap

pkg : libcoap : Update libcoap version
Merge pull request #680 from benpicco/fix_crash

set up message queues for the IP and UDP thread
Merge pull request #766 from mehlis/lifo-author

core: lifo: added heiko as author