Possible fix for #1701: Contour does not pass a list of linestyles to LineCollection

Conflicts:
	lib/matplotlib/contour.py
Add test for setting dashes for line collections

Conflicts:
	lib/matplotlib/tests/test_lines.py
Add image test for setting line collection dashes
Fixes #1721: Can't sort an iterator
Merge pull request #1721 from mdboom/issue_1721

rcParams.keys() is not Python 3 compatible
Merge pull request #1718 from dmcdougall/fix_set_dashes

Fix set dashes for line collections
Merge branch 'v1.2.x'

Conflicts:
	lib/matplotlib/contour.py
	lib/matplotlib/tests/test_lines.py