Adds support for SbtClient lifecycle.

Cleans up SbtBuild to make it more thread safe.