[IMPROV] Check version via > 2 or == 2

This unifies the Python version check. Instead of different kind of
checks (> 2, == 3, >= 3 or == 2, < 3, <= 2) this always uses the first
variant (> 2 and == 2) and if it's like a switch it always does the
Python 3 specific code first and the Python 2 specific code in the else
branch.

Change-Id: I826fd50b7343ff5f6e775936957cdbb5e18cd40f
Merge "[IMPROV] Check version via > 2 or == 2"