SI-6935 Added readResolve in BoxedUnit
When deserializing Unit, it would return an instance of Object, but not a Scala Unit.
By adding readResolve, the deserialization of Unit will work.