Fix some iter{items,keys,values} calls that slipped through the cracks.

Add tests for the functions that were thereby revealed to have none.
Make autoreload close the IOLoop through the standard interface.

This makes it compatible with TwistedIOLoop.
Fix typos in TwistedIOLoop that always sent both read and write events to all handlers.