Change modules to use the MODNAME constant when logging.

The majority of modules were logging with their module name as the
log type. There was a few places which were logging to a non-name
type but, with the exception of CONFIG, those messages are so
uncommon that it doesn't make sense to use a seperate type for
them.
Change httpd modules to use the MODNAME constant in headers.
Modify the log message to contain the log type.
Merge pull request #590 from SaberUK/master+module-logging

Change modules to use the MODNAME constant.
Change the syntax of FOREACH macros to be less dumb.
Automatically attach modules to events