core: refactor zotonic_compile. It could skip work