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