refact: logger and assert stuff
impl: add debug macros
refact: move image processing testing stuff to regrtest module
refact: remove unused stuff; doc: add dev remarks
refact: remove unnecessary stuff(polygonizer and surface interpolation)
fix: additionly assert write error message to cerr