Formation of Circumstellar Material during Double-white-dwarf Mergers and the Early Excess Emissions in Type Ia Supernovae