United Nations secretary general says he hopes accord will help achieve two-state solution; British prime minister calls it 'hugely good news'