core/msg: fix, optimize and improve

fixes:
fix race conditions by reordering dINTs
prevent null pointer dereference by adding forgotten target check
add forgotten eINTs
replace printf with DEBUG
fix debug messages

optimizations:
optimize pid access
reorder msg_send switches

improvements:
add debug statements
add missing return value to msg_send_to_self documentation
x86: increase timeout in qemu's term

Currently `boards/qemu-i386/dist/term.py` expects QEMU to connect in
less than 5 seconds, which is plenty on any user machine. Travis CI,
which we use without paying a cent, sometimes fails to start QEMU in
this is timeframe, though.

This PR increases the timeout to one minute.
Merge pull request #1285 from LudwigOrtmann/msg_fixup

core/msg: prevent null pointer dereference
drivers/cc2420: fix logical error in cc2420_do_send function

Do the correct test in cc2420_do_send() function when analyzing
the result of cc2420_load_tx_buf()
boards/xx/driver_cc2420: fix race condition in CCA determination

Ensure that CS is active and IRQ disabled when querying CCA
on CC2420 (cc2420_get_cca() function).
Also do a little refactoring (renamed c variable into count,
and named the constant corresponding to RSSI "timeout").
make: removed shell_commands dependency
Merge pull request #1383 from rousselk/fix-cc2420-tx

Fix a design error in cc2420_do_send() function
Merge pull request #1385 from rousselk/fix-cc2420-driver-cca

Fix a nasty race condition in CCA determination on CC2420
boards/z1: fix cc2420_txrx function in CC2420 driver HAL

When waiting for transmission (to CC2420) to be done,
we were wrongly waiting for UCBUSY bit to be set,
while one should actually wait for that bit to be cleared.
Merge pull request #1382 from Kijewski/qemu-i86-term-timeout

x86: increase timeout in qemu's term
Merge pull request #1386 from haukepetersen/fix_shellcmd_dep

make: removed shell_commands dependency
destiny: deleting packed attribute from socket_internal_t

While testing the tcp implementation on MSBA2 I noticed that
the value of `tcp_input_buffer_end` gets changed whenever acquiring or
releasing the mutex of the struct on the server side.

After deleting the packed attribute of the struct this problem was
resolved and the value stayed the same after acquiring and releasing.

This problem could maybe arise from badly placed cache lines due to
missing padding... I am not sure.

Anyway, I guess using the packed attribute is useless here and makes it
more error-prone.
destiny: Adjust TCP_STACK_SIZE

Currently, the TCP_STACK_SIZE is `KERNEL_CONF_STACKSIZE_DEFAULT`.
However, since printf statements are used in the tcp relevant code,
this stack size is too small (esp. for MSBA2).
Merge pull request #1391 from cgundogan/fix_tcp_kernel_conf_stack_size

destiny: Adjust TCP_STACK_SIZE
Merge pull request #1390 from cgundogan/fix_socket_internal_t_packed_attr

destiny: deleting packed attribute from socket_internal_t
tests&examples: use sizeof(stack) in thread_create

fixes #1392
tests&examples: apply coding conventions to sizeof
test: remove superfluous stack size defines
Merge pull request #1388 from rousselk/fix-z1-cc2420-txrx

boards/z1: fix cc2420_txrx function in CC2420 driver HAL
Merge pull request #1393 from LudwigOrtmann/issue-1392

tests/examples cleanup