xub_StrLen to sal_Int32 with minor optimizations

Change-Id: I111e7c84e003b2bd4599824e42215066c4726023
Fix static linkage and use SAL_N_ELEMENTS

Change-Id: Iced21e010b3c06a5f36731f63d41ab55a5c8a2e4
xub_StrLen/sal_uLong to sal_Int32 + minor optimizations

Change-Id: Ibbca8e2d2a4742247648a611337bd8a75db7ee2f