Fix initializing bitmaps from DIB in wxMSW code.

Don't call wxDIB::CreatePalette() on an invalid (because its handle had been
detached from it) DIB object.

Also add some comments to explain this code a bit better.

Closes #16045.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76082 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775