Switch address spaces when scheduling a thread of another task

Class method Task::activate() loads in CR3 (or PDBR) its address
space. We do this only when the tasks are different, since a
write to CR3 causes flushing of some paging-related data structures.

Notice that we moved the method Thread::dispatch to the thread.cc
to avoid circular dependencies between Thread and Task.