node: prevent recursive throws

If before/after/error throws it's possible to enter into an infinite
recursive throw. This is fixed by immediately throwing if one of those
callbacks also throws.
WIP: fixing up implementation
WIP: oh, it's looking sooo good