Use -Werror.

This makes all warnings errors. We don't want any warnings, so we should
enforce that.
Make Travis compile on GCC and Clang.
Add unit tests for ported filesystem functions.
Remove dead stack-checking code.

Code under HAVE_STACK_LIMIT is not used.
The definition was commented out in rev 180 of the original
Mercurial repo, and then completely removed in rev 2520,
but the code guarded by it was left in.
Remove traces of old custom undo memory manager.

There were two memory management implementations,
standard malloc-based, and a custom allocator.

Removed in rev 2230 in the Mercurial repo.
Move some of misc1.c to indent.c.

My little contribution to #209.
Merge remote-tracking branch 'upstream/master'
Little by little add const where possible