Dolly Parton’s faith helped her remain optimistic throughout her health struggles