todo.c: changed non-standard \e to \x1B
Makefile: stabilized JSON_LIB compilation by cleaning it before make

libjson compilation sometimes worked, sometimes didn't. Apparently
cleaning it before makes it work always.

Strictly speaking, this change will make libjson compilation suboptimal,
but considering that library changes are out of our control, and changes
sounds acceptable.
Makefile: fail early on libjson compilation

If autogen.sh fails would run ./configure anyway. Same for ./configure
and make.

In the case of failure we would not be able to easily pinpoint the
error among the scrollback. The next command would (and should) fail
as well anyway.