Buck test integration shutdown clean

Don't know why djmitche's "fix pyflakes" commit is included here...


This test demonstrates the deadlock-during-clean-shutdown issue I've been working on.
Uncommenting the FIXME(#2019) line causes the master to not shut down (the test fails after 1 second).

The brd has always been shutting down twice, but this is the first time it's under test.
I've grandfathered in the status quo behavior with a fixme.
The (future) fix we've agreed on is to separate the clean-shutdown behavior from stopService.
Maybe that needs a ticket?