[dist] testpy.py: change 'region' to a local variable

Now, it becomes easy to execute a test manually from the python's
interactive shell.
E.g.:

    $ python
    >>> import testpy
    >>> testpy.x2(r"a+b+", "aab", 0, 3)
    OK: /a+b+/ 'aab'
[dist] makedef.py: simplify the logic
[dist] makedef.py: detect if a feature macro is enabled