Pakistan replaces spy chief early