Reimplemented the random string generator due to multiple problems:

- We were not generating unicode chars higher than 16 bit (no surrogate pairs)
- The distribution was strange, there were always a lot of unicode chars, even though normal chars might break the test too.
- Length field was not respected
- Performance was bad due to recursive generation of 1 char per time.

Ps, this also breaks some functions which we thought were working correctly.