use callables in before und after hooks

Currently may be called only the functions, which are acutally in the class hierarchy of `\Tonic\Resource`. It should be offered the opportunity to pass any function or class, not only the native functions.