Fix compilation with clang

Using libc++ causes linker errors.
Fix missing return statement
Fix compiler warnings
Improve hard-edge line drawing
Handle changing dab spacing in a line
Protocol revision number bump