Address issue in casting to dense representation from Decimal9 and Decimal18

While casting from Decimal9/ Decimal18 to Decimal28Dense/ Decimal38Dense we make sure the intermediate representation is transformed into the compact representation before its finally stored in Decimal28/Decimal38.