Josh Magennis celebrated scoring his first double for Northern Ireland as they beat San Marino 3-0 in Serravalle.