Added safety checks to string type conversions.
Merge pull request #5 from ArmstrongJ/strings

Added safety checks to string type conversions
[misc] Make string conversion functions to set *ptr_to_len...

... even when input string is NULL.
[misc] Do not convert NULL strings into "".

This breaks some checks in mCtrl for string conversion errors.
Also trace out GetLastError() when a conversion fails.
[misc] Add proper error checking into the in-buffer string conversions.
[HTML] Remove superfluous parenthesis in a fake BSTR defnition.
[HTML] Unify handling of ->QueryInterface().
[HTML] Add missing ->Release().
[HTML] Reorder notofications...

... MC_HN_PROGRESS and MC_HN_DOCUMENTCOMPLETE into more logical order.
The MC_HN_DOCUMENTCOMPLETE is fired as the last one.
[HTML] Log out HRESULT hexdecimally.
[misc] Fix string conversions for empty strings.
[HTML] Use proper reference counting instead of a dummy one.
[HTML] Disable debug traces.
[HTML] Fix using 2nd param of DISPID_COMMANDSTATECHANGE.
[HTML] Fix wrong assumption (VARIANT_TRUE == TRUE).
[HTML] Treat NULL and L"" BSTRs in the same way.

MSDN requires the NULL and empty BSTR strings (unlike WCHAR*) have to behave the same way.
[HTML] Fix comment typos and break long lines.
[HTML] Move OleUninitialize() into html_ncdestroy().

We have to be sure it is done from the same thread where we did the corresponding initialization.
[HTML] Disable debug traces once again.
[HTML] Do not try to free a L"" on the stack.