A theory of generalized Donaldson-Thomas invariants. II. Multiplicative identities for Behrend functions