A cup of joe may have the potential to do everything from strengthening your gut to cutting the risk of dementia, research suggests