Rewrite to use variadic macros.

Use typeof in definitions.

Make possible to wrap vararg functions.
