Log the current task name in the log! macros.

This requires doing an allocation on log! invocations
if the current task is named, since there is no non-allocating
way to access the name of the current task.

Fixes #2672
@alexcrichton had me specifically add in this static code, to reduce code generation.