[process] Refactor sys_waitpid in a way to avoid unsafe access to tasks
[process] Refactor sys_waitpid in a way to avoid unsafe access to tasks

Before now, that syscall could access task_info* objects with preemption
enabled and that, was, unsafe. This patch addresses the issue.

vvaltchev/experimentOs,vvaltchev/experimentOs,vvaltchev/experimentOs,vvaltchev/experimentOs