Moving tabletmanager client to its own lib

Most dependencies for clients are now clean, they don't
include server code.