Queen Elizabeth II kept in dark for years about Soviet spy in palace, MI5 files reveal