patchupdate.py: Improve patch system and remove dependencies, when the order of patches doesn't matter.