Pervez Musharraf resigns as APML chairman