By MICHAEL D. SHEAR and ADAM RASGON British and Israeli diplomats reached a last-minute agreement to avoid the closure of the British Consulate building in east Jerusalem, Britain’s foreign secretary announced Thursday, leaving behind a scaled-back diplomatic mission to Palestinians. Israel threatened last month to shut the consulate, which has served as the center of British outreach to Palestinians for decades, in response to London’s decision to impose trade sanctions on Israeli…