[sgen-bridge] Separate before- and after-callback in new bridge.
[sgen-bridge] Move processing of API data structures to sgen-bridge.c, for sgen-new-bridge.c.