There's a lot in your post so I may not reply to all of it but take heart. First of all, courts usually side with the mother. If your're not an addict and you're a responsible mother, regardless of whether you have had a job or not, the courts will likely not take away custody. They might grant joint custody but he will have to have it approved through the courts in order to move a long ways away from you. Look around in your area and see if you can find some legal aid to make sure that he doesn't take your money. The courts don't care if you've been working, the fact that you have been taking care of the children is work and you might qualify for alimony as well since you haven't had a job outside of the home. There are some wonderful organizations that will answer all your questions if you take a moment to seek them out.
Secondly, start rounding up your support group. Do you have family, friends? You might be surprised who will come to your aid, even family members you might not have spoken to in awhile. Swallow your pride and accept all the help you are offered until you can make it on your own. Thirdly, get counseling. If you can't afford it, look for the free programs in your area. There are those out there that will love you and respect you for who you are and treat you the way you deserve to be treated. You might also want to check out a couple books on codependency. I am not saying you are codependent but its hard not to be when you've always relied on someone else. Sometimes, its just a product of the environment and not of the personality.

You can do this. Do not let your fear stop you or you will have more of the same and your children will continue to hear the names that he calls you and see the way he treats you and may grow up to do the same. Take care...