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 was more thinking of just calling `Thread.getAllStackTraces().keySet`, filtering for netty-named threads, and looping until a timeout is reached or all the netty threads have shut down. Should just be a couple lines of code and will make it more robust (whether it's 100ms or 3s). Or is something wrong with that approach?