Move to multiproject build for common and api subprojects.