sagedev.py: reworked the patch header parsing to support most patches from the sage-combinat queue