change debug macro to advanced format

let's start a discussion about a more advance debug macro.

this adds a new debug macro with two new features:

1. debug level support (on compile time, so no overhead)
2. line and file logging support

[this is part of my integration of the CCN stack]