fixed bug in terminal_push_data; added some utf tests to api_test

the amount of characters that libvterm says can be pushed does not
reflect how many characters we can actually push. it seems to be
affected by the value of the characters we push, thus it is best
to check whether more input can be pushed every time we are about
to push a uint32_t