Improve compatibility of rst snippets with Python 3

This fixes the ``ol`` snippet which uses the ``xrange()`` builtin and the ``em`` and ``st`` (strong) snippets, which use the ``has_cjk()`` function.
just always use range. It's not like we are creating ranges of huge lengths.