Py3k-friendly dict iterables.

Based on 2to3 -fdict with some manual edits to reduce
materialization where it's unnecessary.

This has a measurable performance hit on Python 2.7, see:
https://groups.google.com/d/msg/mozilla.dev.builds/4bg8SUV3cJQ/oscv9u0WQVcJ