Split up the Build class, as suggested by @stof in https://github.com/composer/composer/pull/2563#discussion_r8774349.