rewrite implicit casts to new concrete cast functions

maybe add a comment to register functions also in CastFunctionResolver ?