pycompat: remove large Python 2 block
We no longer support Python 2. So we can delete its compatibility
code and remove the conditional and dedent the Python 3 code.
In order to make the linter happy, we had to inline imports in the
stanza at the top of the file.
Differential Revision: https://phab.mercurial-scm.org/D12250
local test passed
addgroupcopy test passed
clone test passed
lowlevelcopy test passed
slicing test passed
issnapshot test passed
findsnapshot test passed