The risk of an explosion at a large warehouse fire closed both carriageways of the M25 between junctions 22 and 21A.