A pass at auto-detecting indentation.

This actually sometimes works, but I realize now that this is doomed to failure
without some knowledge of the structure of the text in the buffer. So I'm going
to throw this away and replace it with something that specific modes can use.
Punted indent auto-detect to major modes.