There are cases when a checker cannot know in advance the nature of the return value they try to retrieve from a CallEvent. If it is a class instance then it must use getReturnValueUnderConstruction(). If it is not, then it must use getReturnValue(), because the former function returns None since only class instances have construction context.
Simlarly, arguments which are class instances passed by value are copy-constructed into the parameter. To retrieve them the checker needs to invoke getParameterLocation() instead of getArgSVal(). However, for basic types and class instances passed by pointer of reference only the latter can be used to track the value of the argument.
To save checkers from doing these branching all over the time this patch introduces two methods to CallEvent: getReturnObject() to get the correct return value and getArgObject() to get the correct argument.