Sacked head of Foreign Office said there was ‘dismissive attitude’ to security vetting of former ambassador