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.