(refactor) move referencePath logic to genBase

Only move referencePath logic for Angular components to genBase.
Element's referencePath logic remains in element/index.js, so it
can override config.referencePath.