Generalize pthread_sigmask wrapper as _sigxxxmask_base

This patch changes the pthread_signmask class into _sigxxxmask_base
and re-implements pthread_sigmask as a trivial subclass with the new
_do_mask() method which simply calls thre low-level pthread_sigmask()
function.

This allows us to share code between process wide and thread-local version
of the class.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
Add pthread_sigmask wrapper class

This patch adds a high-level wrapper API for pthread_sigmask, which is
implemented on top of the _sigxxxmask_base class.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>