Reconstructions of the heliospheric modulation potential and Wolf numbers based on the content of the 14C isotope in tree rings during the Maunder and Spörer minimums