Feature emval improvements

As discussed in issue #2925, here is the proposed patch for discussed improvements.

Let's shoot remarks ;-)
_emval_decref already has a special case: `if (handle &&`  I think you simply need to change it to `if (handle > 4 &&`