Science shows that being closely involved in each other’s lives protects grandparents against isolation and helps kids flourish.