close some memory leaks involving nailgun

@yilongli please review

This pull request removes some major dominators that were keeping memory accessible long after the application had quit
since it's no longer static, we should probably change its name to ```sortCacheTable```