Rolling backport of unittest.mock for all Pythons.

WWW: https://mock.readthedocs.org/en/latest/
