What is the primary purpose of applying a vapor-permeable waterproofing sealant to a masonry chimney?