routing: improve multiline debug
Add IF_DEBUG_LEVEL() macro to ensure all debug output preparation
is run only if the current debug level is sufficient. Consistently
use it within routing subsystem.
MFC after: 2 weeks
(cherry picked from commit 578a99c939b6f7a774f399fc7b64ee956c4ae200)