patch installer: fix  patch,and add support of  revert patches

Change-Id: Icd3309efab6152ca8f8871034afce78700bd7f20