Change the contract of takeTask() so that the subclasses deal with wakeup tasks correctly

- Add updateLastExecutionTime()
- Make sure runShutdownTasks() return true even if an exception was raised while running the shutdown tasks
- lastRunTime -> lastExecutionTime
- Replace the isShutdown() calls with isShuttingDown() to conform to the new semantics
- Inspector cleanup