Refactor|libdeng2: Added a macro for defining as/is conversion templates

This makes it easier to have the as/is methods consistently available
wherever needed.
UI|Client|Widgets: Improvements to DialogWidget (and popup, button)

Dialogs now define some generic button roles (accept, reject, etc.)
so that it is more convenient to construct dialogs.

Dialogs also don't grow larger than the view height, and will
allow scrolling up/down if the content doesn't fit.

Cleanup: Applied the maybeAs() method