writerfilter: refactor to avoid redundant Papx class in doctok

Change-Id: Ic65e750bab99fb6b4c862418ccc53aa4b1f1298e