Revert "Merge commit '61c31e4ee7ea79a9e74c0476b81244febf17e6d7'" (configure: Properly set zlib dependencies for all components)

The reverted commit introduced undefined behavior.
undefined in the sense that the evaluation order of the dependencies affects the results

Fixes Ticket2920

This reverts commit c32db6adab9942781cc5a23f62abb839a5595a83, reversing
changes made to 05f1b4e2ecc4683467669a190e3a53df413de805.

Alternative solutions would be to change the dependency solver to handle non trivial
dependencies or to enable zlib by default before the dependency solver, this would
leave a zlib dependency in the libs though then even when no zlib is needed or used.
