auto merge of #8235 : pcwalton/rust/unsafe-extern-fns, r=pcwalton

r? @brson
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