wxWeakRef can work with forward-declared classes provided dynamic_cast<> is
available but this wasn't detected as being the case due to the use of the
obsolete HAVE_DYNAMIC_CAST in its code.
Replace HAVE_DYNAMIC_CAST with !wxNO_RTTI to fix this.
Also add a unit test checking that this does work.
Closes#11916.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63986 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The ctor used by these tests can't be enabled for VC6 (see r63955), simply
disable them to allow the rest to compile.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63965 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775