Harden core extension's createMixin.

Harden and add unit test.

Also fix name conflict.
Cleanup core extension unit tests.
Complete core extension mixin API unit tests.