Initiate a teardown of scheduler lifecycle upon application exit.

Reviewed at https://reviews.apache.org/r/18713/