pct-speedtest.py: Add CTR-mode tests
Fix MODE_CTR memory leak under Python 3

The leak arose from the string creation in this line:

    PyObject_HasAttr(counter, PyUnicode_FromString("__PCT_CTR_SHORTCUT__"))

This commit replaces the __PCT_CTR_SHORTCUT__ hack with code that
imports the _counter module and checks the appropriate types.