Make calling generic rdata methods consistent
add matching macros to pass arguments from called methods to generic methods. This will reduce the amount of work required when extending methods.
Also cleanup unnecessary UNUSED declarations.
(cherry picked from commit a88d3963)
Closes #2597 (closed)