change finalizer argument order to allow for do-block syntax

Implements #6454.  There are some warnings due to method ambiguity errors when building the system image, I couldn't find a way to remove them while deprecating the old argument order.