refine Hook.opt_*

- fulfill more test-cases based on combination of Hook.opt_*
- rename 'after', 'before' to 'in_', 'out_'
- add 'inout_'