Usually a broken clutch spring can cause the engine to quit when you apply the brakes. You've already tried opening the idle gap which didn't help (and for reference, 1mm idle gap is too much - .5-.7mm is better). Check the clutch springs and make sure they're not too worn or one is broken.