ticket:9101: improve CollationSettings memory management via new SharedObject base class

git-svn-id: http://source.icu-project.org/repos/icu/icu@34804 251d0590-4201-4cf1-90de-194747b24ca1
ticket:9101: C code does not want variable declarations after statements

git-svn-id: http://source.icu-project.org/repos/icu/icu@34805 251d0590-4201-4cf1-90de-194747b24ca1