Make doc-check fail the build on warnings

This makes it easier to run it in Jenkins, even if it makes it work
inconsistently compared to the Doxygen targets.

Change-Id: Ifc469fb598f1f3287bc1a5dded231b304023a810
Another batch of added config.h

Include config.h explicitly in most places where it is used instead of
relying on getting the definitions from "somewhere".

Change-Id: I3c6702cea59fca10226a13714c8ffddc482c224a