Added testcase for #545913
Make more use of call chain return type resolve function

Added GetCallChainReturnType() to every bracnh of GetClassName() so any
place where the original variable's return type can be determined will try
to resolve the call chain's last retutn type.
Generalize GetCallChainReturnType to work with properties too

This should make the scenario in the title of #18 work
Oops, Fix "found type" condition in GetCallChainReturnType()

The previous would be always true
Merge branch 'master' into my-develop