smart_ptr: get() returns pure pointer with BS_DISABLE_MT_LOCKS set
logging: remove bs_report dependancy on bs_misc.h

Move locked_channel::bs_end() implementation to cpp file.
Also fix source formatting.
bs_misc: add system native locale auto-deduce to string <-> wstring converters

1) wstr2str() and str2wstr() by default converts to/from encoding
defined by system locale (enc_name = "")
2) if enc_name = "utf-8" or "UTF-8" then UTF8 encoding with system
regional settings is used.
3) add ustr2str() and str2usrt() to convert between UTF-8 string <->
string in given encoding (native system encoding, if enc_name = "")
4) add str2str() function to convert string from one encoding to
another.
serialize: wide strings are converted to/from UTF-8 during serialization