Former England skipper Hartley retires