API tests: fix file handle leak in SBT, thread exhaustion in Travis

I believe I finally have a handle on the multiple problems, and have fixed or worked around them here. What a pain.
I agree this sucks. The way it's set up, the netty thread pool always waits for exactly 2 seconds before shutting down. And it returns a Future that you can wait on to be notified as soon as it's done. But Unfiltered ignores that Future and simply returns. I'm not sure if it would be possible to get access to the thread pool and do this in a better way.

Actually, what would be best would be to configure Netty not to wait so long, since we know no more requests are coming. I looked at that for a while and it appeared to involve a lot of re-implementing things.

Frankly, I'm pretty fed up with the lack of flexibility of Netty, Unfiltered, Async-Http-Client, and Dispatch, all of which contributed to the problem and the difficulty of debugging it. If it starts running consistently in Travis, I'd just as soon leave it be for now.

The problem is that this test wants to test just our request handling, but ends up being an integration test of unfiltered, HTTP, sockets, and a whole bunch of other stuff. A real solution would be to figure out how to call the ApiServer more directly and avoid many of these pieces.