Mask async exceptions during unsafePerformIO and realloc output memory before returning

This should allow to GC to reclaim memory we didn't use.
Always allocate 4 times as much output memory as input memory

We reallocate after conversion anyway, let's keep the code simple
and don't add arbitrary in/out ratios for different encodings.
Don't output remainders of previous conversions separately

Instead put them at the beginning of the next conversion to prevent
each remainder to be a few byte bytestring that is immediately followed
by a larger one.