Fixes segfault described in #794

Fixes bug in sys_semaphore_create() when a NULL pointer address is
passed in sem or attr.

Fixes bug in sys_semaphore_get_value() when a NULL pointer address is
passed in count.
Merge pull request #860 from devmapal/master

Fixes segfault described in #794
Adds copy constructor for class InstrBase

A copy constructor is necessarry for `class InstrBase`, as the implicit
copy constructor simply copies the pointer `m_args`. This results in a
double delete of the same memory region, causing a segmentation fault
when rpcs3 exited.
Merge pull request #861 from devmapal/master

Fixes segmentation fault on exiting rpcs3