Allow cask instance methods within blocks

This covers after_install and after_uninstall.  The caveats
stanza is treated separately.
Merge pull request #2456 from rolandwalker/instance_methods_in_blocks

Allow cask instance methods within blocks