patchupdate.py: Various speed optimizations and improvements, removed several patches (accepted upstream).