bstr: check strings before memcmp/strncasecmp

bstr.start can be NULL when bstr.len is 0, so don't call memcmp or
strncasecmp if that's the case. Passing NULL to string functions is
invalid C, even when the length is 0, and it causes Windows to raise an
invalid parameter error.

Should fix #1155
DOCS/client_api_examples: qtexample: set the locale

QApplication sets the locale, so change the LC_NUMERIC category back to
"C" for libmpv.

See: http://qt-project.org/doc/qt-5/qcoreapplication.html#locale-settings