Ianoc/refactor macros

Moves the macro's into one target, don't think we need a common separate target yet.

Attempt to remove duplicated code. Rename test classes to be more obvious what they are (too much use of A, B , both types for a func and concrete classes)
while you are refactoring these, I always thought the extra level of indirection here (method calls inv.apply/fn.apply), was wasteful. We don't need it in a macro. We could just inline the method calls.