added support for execution order for "Before" and "After" hook. closes #807