DRILL-2547: Don't allow Drill to shut down while queries are still executing
This will cause Drillbit.close() to block until all currently executing
fragments have completed.
WorkManager
- added waitForExit() and indicateIfSafeToExit(), which use a latch to
wait to shut down if there are active fragments
- waitForExit() times out after 5 seconds
Drillbit
- call WorkManager.waitForExit() in close()