Add runtime test to the C# test suite's director smartptr test that demonstrates crash in generated code when directors are used with smart pointer types.
Fix C# compile time warning in director_smartptr test.
Add check for smart pointer type in generated code for director connection. This fixes a crash in the generated code caused by the dynamic_cast returning 0 because the specified types are incorrect for smart pointer types.