British ambassador to US resigns over leaked memos