call garbage collector if low on memory for base64

The base64 codec uses java and is limited by the available java heap
space. If java reports insufficient memory for encoding/decoding, this
calls the java GC and tries again.

Before, sending critically large data would *sometimes* work, but not
always, depending on the current GC state of the java heap. Now, if
sending a block of data worked once, the chances are much better that it
will work always.