Congruence relations and functional completeness in universal algebras; Structure theory of hemi-primals, I.