It was the second time in two years that a gunman has gone on a rampage in Montenegro’s historic capital, killing adults and children.