kontrol: expose functions and packages

This exports some of the types and functions in kontrol that can be used outside in other packages if needed. Also it contains race condition fix that I've encounter during the refactoring.