Prosecutor lost job and pension entitlement after he accused police of lying and asked colleagues to mark anniversary of Tiananmen Square crackdown in emails.