Fix MainLoop::RunImpl::get_sigmask() to correctly return empty sigset_t
when SIGNAL_POLLING_UNSUPPORTED is true. On NetBSD (and probably
on some other platforms), integers are not implicitly convertible to
sigset_t, so 'return 0' is erraneous. Instead, sigset_t should be reset
While at it, move common parts out of the #ifdef.
// FTR: I don't know if this wouldn't break Windows. I'd appreciate if somebody could test it. Alternatively, I can watch buildbots after merging.