AIM: add early check for log level

Reviewer: @jnealtowns

This speeds up my barrier benchmark by 20%. It compiles down to a "testb; je"
which skips all of the argument setup for the varargs call (including things
like strerror) and the call itself.

I disabled this if the environment variable check is on so that I don't break
that feature. It seems like the env lookups could be done at log registration
time, which would make them compatible with this optimization.