Merge pull request #1016 in CASA/casa from CAS-12527 to master
* commit '459ab5e3acaa3f9e7ced7ab6a4a6aa7919fbf515':
changes to shared_ptr etc. better mem management in ca tool interface, CAS-12527
prevent leaks in stats(), statsWrap() and various function returns, CAS-12527
prevent leaks in CalAnalysis::SPW_INFO functions - return by ref, CAS-12527
prevent leaks from CalAnalysys functions returns by ref, CAS-12527
don't return reference to internally allocated memory in CalStatsFitter, CAS-12527