Further header refactoring.

Change log & options initializers back into functions. Changed
mdt_res_write into function. Added an error return paramter to
md_fatal(). Created new midnight.h header. Added .PHONY line to Makefile