Upgrade Cadence to 0.0.39

For the reverse application of finalizers.

Closes #376.