Correct two bugs in wxMBConv::FromWChar() with non NUL-terminated strings.
The variable "lenChunk" was incorrectly used as the length of the wide string
chunk which could result in wrong output.
Worse, the output buffer could be overflown for the final chunk because it
didn't have to have enough space for the trailing NUL(s) in it.
Fix both bugs and added unit tests for them.
Based on patch by Kuang-che Wu.
Closes #11486.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62793
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775