Rimestats bugfix: only compile the rimestats printout if rimestats are enabled
Minor code style fixes to the contikimac and nullrdc code
Bugfix: keep track of receiver being awake as a local variable rather than a global, as it may have changed between invokations
Defensive programming: make sure that we don't fail completely if we get a callback for a NULL pointer
Minor bugfix: explicitly cast pointer argument in debug printf
Include the rimestats variable only if rimestats are enabled by the configuration
Bugfix: check the size of the outgoing packet to avoid overflowing the output buffer