(#17887) Ensure log message is initialized when Exception raised

It's possible to run the "ensure" block without having executed either the
main or "rescue" blocks, if an Exception not derived from StandardError is
raised or when testing with Mocha expectations.

If this happens during the property.sync, this causes an immediate exit from
the main block, but the "ensure" block is still run.  The event message won't
have been initialized yet, so this then causes the logger to report:

  Puppet::Util::Log requires a message

This ensures a message is logged from the context of the resource before
letting the exception propagate up to the application.
Merge branch 'domcleal-tickets/master/17887-resource-log-msg' into stable

* domcleal-tickets/master/17887-resource-log-msg:
  (#17887) Ensure log message is initialized when Exception raised

closes #1614