Expand uses of SO2_DECL_BASIC_CLASS_DLL macro

Change-Id: I6bee19954e930248058128c9e01cc23b3395bf20
Remove unused macros

Change-Id: Ib4838eacd9240664327292bf12c7a14a8cdfbcf1