Starmer’s attorney-general vows to restore UK’s reputation on rule of law