gdb: Split python's version into major/minor and check for embed option
Cherry-pick from 70f302e0 for rtems5, so that we can close #4897.