Added per-document indentation settings and indentation auto-detect.

Auto-detect executes automatically when loading files.