add AB_SWITCH macro for dispatch over absyn tag

Ultimately, all code that dispatches over all or most tags should use this
macro. Adapt the macro to fit into other use cases.