make Durandal compatible with dojo AMD loader

replaced CommonJS wrapping; added checks in system.js for dojo and
requirejs