writerfilter: make dmapper logging a runtime decision, not a buildtime one

It's still only enabled in debug builds, but it now requires an
environment variable, not rebuilding with dbglevel=2.

Change-Id: I970c7bfe0b3f547429ef37f37406a095a60c34ff