Caring for grandchildren may protect against cognitive decline, study finds