Tuned RefCountPtr for conversions

I still have some doubts about this implementation for correct (dynamic)
conversions. The dynamic_cast<> approach didn't work as expected (get()
returns NULL for non convertible T/U pointer types), checking get()
results with dynamic_cast<> works though.