Research-backed lifestyle changes can sharpen your memory and keep your brain agile for years to come.