DEBUG build logging should be synchronous.

Having logs happen asynchronous when debugging is annoying, and seems
to trigger false test failures, especially with iOS 7.1. So if no
shared logger is set, and it's a DEBUG build, then log on the current
dispatch queue. We still check the shared logger on the logging queue,
to prevent a small race.