Factory should emit event when mixin is defined

This commit adds the defineMixin event for mixin definitions and related unit tests.