Fixes return value of sys_semaphore_create()

In case of att.addr() being NULL, CELL_EFAULT must be returnd and not
CELL_EINVAL, according to the corresponding ps3autotest.
Fixes segfaults for sys_event_flag_(create/get)

Neither sys_event_flag_create() nor sys_event_flag_get() checked for
NULL pointers in their arguments, which caused the corresponding test
from ps3autotests to segfault.
Merge pull request #868 from devmapal/master

Fixes issues in sys_semaphore_create() and sys_event_flag_(create/get)()