openssd: implement gc hooks

We want to allow a plugin archicture for future extensions. We do this
by extending function interface of struct openssd with begin/end_gc
calls. This allows us, in a generic way for frameworks that hook into
the gc code to implement there own flow, without changing the gc code.