process: fix domain nextTick regression

Fix for GH-4856

I'm not happy with the additional check in the `_tickCallback` outer loop, but i'll save optimizing that for another day. The issue is fixed, and added the additional test.