Wrap unused parameters in UNUSED(), and debug-only parameters in DEBUGUSED(), to cut down on compiler warnings. The macro also renames parameters to catch accidental use. (There are more places to clean up but I don't want to modify code that isn't compiling on my machine.)