Refactoring tabletmanager RPC system.

It makes the actions type explicit. And also catches panics
properly.