Reversible doping polarity and ultrahigh carrier density in two-dimensional van der Waals ferroelectric heterostructures