Add expand-query macro

Implementation for https://github.com/nathanmarz/cascalog/issues/27