MI5 files have revealed that film star Dirk Bogarde had been warned that the KGB had identified him as a “practising homosexual”.