Two men have been arrested over the alleged attempted murder of an off-duty police officer in Northern Ireland.