Csharp director smart ptr

Fix a crash when directors are used with smart pointer types due to an incorrect dynamic_cast. This is nearly identical to the patch for the same issue in the Java module.

Add a C# runtime portion the the director_smartptr test case to verify correct behavior.