A man has appeared in court charged with the shooting of an off-duty police officer in Northern Ireland.