To avoid conflicts between dependency generation and header
installation, we need to separate the header installation out into a
separate step in the build that needs to be done before the actual
build.
Add a "HEADER_SUBDIRS" list to indicate which directories we need
to build headers in, and iterate it before the SUBDIRS build target.
Replace the implicit header installation rules in makefiles with
explict header targets so this will work.