Merge 'macros' and 'custom' attributes into 'vars', part 1.

Refs #5855