Refactor ext_emconf and composer.json.