NATO leaders seal a landmark agreement to hand over control to Afghanistan's security forces by the middle of next year.