Added support for preDispatch() and postDispatch() methods on resource classes (issue #18)