Fixed UNUSED macro so that it doesn't require type knowledge.

Introduced new UNUSED_VAR macro that is used when type knowledge is available (for local variables).