Improve and extend wxBasicString API and fix multiple BSTR leaks in due to confusingly named Get() method in the old API. Closes #17889.