tests: Fix braindead typo in State Server reset test.
StateServer: Create helper function to handle switching to a new parent.
StateServer: Move object destruction handling into its own function.
StateServer: Implement STATESERVER_SHARD_RESET.