Video shows children told to line up, with an officer telling them to say ‘cheese’, saying picture was taken due to rock-throwing attack on forces; military says incident is a violation of regulations and that those involved will be disciplined