Move the scheduling of service restart upstream from onDestroy().

Potential fix for issue #51.