Fix background job shutdown
Fix background job shutdown

When a user calls sbt exit and there is an active background job, sbt
may not exit cleanly. This was primarily because the
background job service shutdown method depended on the
StandardMain.executionContext which was closed before the background job
service was shutdown. This was fixable by reordering the resource
closing in StandardMain.runManaged.

mdedetrich/sbt,xuwei-k/xsbt,xuwei-k/xsbt,sbt/sbt,sbt/sbt,mdedetrich/sbt,xuwei-k/xsbt,sbt/sbt,sbt/sbt,sbt/sbt,xuwei-k/xsbt,mdedetrich/sbt,sbt/sbt,mdedetrich/sbt,mdedetrich/sbt,sbt/sbt,xuwei-k/xsbt,mdedetrich/sbt,mdedetrich/sbt