Fix for issue 4111.

Define an items() function which delegates to dict.items() or
dict.iteritems(), depending on Python version.

I don't (yet) have tests to exercise the change to trigonometric.py or
polycontext.py.

	modified:   core/compatibility.py
	modified:   core/tests/test_compatibility.py
	modified:   functions/elementary/trigonometric.py
	modified:   polys/polycontext.py