cfengine: fix opportunistic linking with mysql and postgres

Fixes #24448.
Import CVS from dupes
Implement inferred CVS dependency

Fixes #24444.
Closes #24445.
Closes #24458.