[sgen] Add internal test helper for sgen-toggleref.
[sgen] We must do bridge processing with all sgen locks taken.
[sgen] Split mark/clean phase of sgen-toggle processing to account for transitive liveness.

Given two TG objects A and B. A is strong, B is weak, A points to B. B should remain registered
for TG processing since it's reachable thru A.

This means we have to split processing in multiple steps. Phase one marks all strong refs that should
happen before finalizer processing and phase two that happens after finalizers that cleanup those
that turned unreachable.