demmt: move logging macros to a separate file
demmt: move buffer handling code to a separate file
demmt: move configuration handling code to a separate file