pcntl_signal_dispatch: Speed up by preventing system calls when unnecessary

This should be a fairly cheap win to make pcntl_signal_dispatch() somewhat faster in the case there are no signals pending.