A general physicochemical model of the inner coma of active comets. 1: Implications of spatially distributed gas and dust production