Close connection after executing build with tooling API. Introduced a listener for supporting this and future functionality in a generic way.