correct handling of buffer sizes for POSIX::strxfrm()

There were two problems:

1) we allocated srclen*4+1, but then only supplied srclen to the first
  strxfrm() call, which meant we could be "failing" the strfrm()
  unnecessarily.

2) the return value of the first strxfrm() was being handled correctly,
  the contents of the output buffer supplied to strxfrm() is indeterminate
  when the return value is the buffer size or larger, so we should
  make a new call then.