replace all remaining `for` with `foreach` or `do`
make `for` parse as `foreach` does

Closes #6997
rm obsolete documentation on `for`

it is documented in the container/iterator tutorial, not the basic
tutorial
modified logging function to truncate output and adjusted error output formatting tests to be compatible with both the new and old runtimes
fixed the buffer to make it a more reasonable size
auto merge of #8244 : thestinger/rust/for, r=brson

r=huonw

There's some ugliness due to lacking external versions of the iterators in `librustc` and needing to manually implement returning from `do` with state in a variable. This should go away as they are implemented, with or without help from the compiler.