Getting vaccinated against shingles may not only lower risk for the condition — it may offer some protection against dementia, a new study suggests.