General Heterogeneity Effects on the Onset of Convection in a Porous Medium