The shooting in Istanbul’s Ortakoy neighbourhood, an upscale district on the Bosphorus shore, followed a year in which Turkey was shaken by a series of attacks by radical Islamist and Kurdish militants and by a failed coup.