[wip] Add DSL for after_install and similar blocks

Refs #5268

This is just a prototype version. Some tests are broken and others missing, but I wanted to get feedback on the general direction and style advice so that I can continue working.
`@command.run` accepts the option `:sudo => true`.

Probably better to use that directly rather than `system_command`, which I assume you are exposing as interface in the DSL.