Women who enter the menopause at an earlier age could be at higher risk of dementia, according to a new Irish-led study.