Log exception if max scheduling attempts exceeded

This logs the last exception seen by the scheduler to help troubleshooting.

When an administrator shows an errored instance, the fault reported is
NoValidHost which is easily misread as insufficient capacity.

This is currently covered by tests.

Change-Id: I636ec9809ded2d4e3404c1f13e0d7635b9826bfe
Merge "Log exception if max scheduling attempts exceeded"