improve Headers.iter

This code is currently used in the servo branch, forgot to make a PR to master.
Oh, wow. I totally didn't notice I implemented on a trait object...