All these people with advice but not one genuine offer of a home.
Exactly. It's easy to be a keyboard warrior. Truth is, no matter how much you don't want the dog to be put to sleep, there's no one that will take him. There's no practical solution. I wouldn't foster an aggressive dog, and I don't think very many people realistically would. It's a liability, and if he causes damage to another dog or child the person taking the dog in could be responsible for vet bills or legal issues.
It doesn't matter if she caused the dog to act like this, it is what it is now. She can't take the time to train him if her toddler will be put in danger, it's just not a feasible solution. Love and patience is all well and good, but not at the expense of a child. No animal will ever be worth the safety of a child. It doesn't matter if the child yanked his tail, no dog should ever snap. Not ever.
Even if it was the child's fault, the OP cannot reasonably keep an eye on both at the same time 24/7, she's not a robot that needs no sleep. It only takes one second for her to turn her back and a toddler to run off and antagonize the dog that could result in a serious injury for the child. She could potentially teach the dog and toddler to co-exist, but that requires time she does not have, and that she should not make. Even if she got the best trainer, that still requires the dog and toddler to be in the same house which once again, training should not be at the expense of a toddler's safety while the dog learns.
The fact of the matter is, the dog is not compatible with the owner's home. Which is fine. Not all dogs make a good match. I had to give mine up when we had DD because we couldn't potty train him. Unlike me, she can't find a place willing to take him because he's aggressive.
There is no real practical option besides putting the dog to sleep. She's doing the right thing. The second a dog snaps at a child, is the second it should no longer be allowed in the house with them, even if it was the child's fault. Dogs are not capable of complex reasoning, if they snap once, they'll do it again, and a child's safety is an unacceptable risk to place a bet on whether he'll snap again if she just does X.