Fix type and documentation of sched::thread::id()

After commit 5c652796fe8d08b7ecc87739025492505c9c1b5a, our thread id
is 32 bit, not 64 bit. This patch fixes the return type of the id()
function, and replaces an incorrect comment (which claimed that the
ids are unique during the lifetime of the system) with a more accurate
description on this function, using a doxygen comment (so it can be
seen in our doxygen API documentation).

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
mmu: Use thread_handle instead of thread pointer in tlb

Thread pointed to by tlb_flush_waiter may exit before tlb_flush_ipi()
calls wake() on it which will cause access to freed memory. Fix that by
using thread_handle which was introduces to handle exactly those kind of
races.

Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Gleb Natapov <gleb@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>