Fix issue #6141: leaking ~fn

When autoborrowing a fn in trans, adjust the type of the datum to be `&fn`.

Fixes #6141.

r? @brson