Moving some code around so it's easier to change.
Refactoring TabletExternallyReparented.

Now that it is inside the agent, it can:
- log at the right time
- only trigger the afterAction if it changed something