Math subject GRE to fill gaps in undergraduate education for PhD application
Okay, here's some advice:
I like that you have an ambitious, but clear, long-term goal: to work at NASA's JPL. That puts you far ahead of many PhD program applicants in a very important aspect.
Getting into Caltech's PhD program seems like a less realistic goal to me, honestly. They have one of the US's very best programs in CS/EE. Very top programs have their pick of applicants. They are likely going to not seriously consider applications with a low undergrad GPA just because that's one of the easier of many cuts they need to make in order to get the applicant pool down to a reasonable size. Or another way to put it is: imagine that your application is very strong except for this one noticeable flaw. They will be looking at plenty of applications which are similar to yours except that this flaw is not present. What do you expect them to do?
Fortunately you don't need to go to Caltech to get a job at JPL (although it wouldn't hurt, obviously). You need to go to a serious, reputable university (think UGA) and acquire and demonstrate the talents and skills that will get you hired at JPL. One's academic pedigree is important but it is certainly not all-important, even in academia and still less in industry. (I got my PhD in mathematics from Harvard, which afforded me the largest possible head-start on the job market. It was quite an awakening to discover that my Harvard degree was much closer to a foot in the door than a golden ticket, and the amount of work that I had to do after getting my PhD from an absolutely top program in order to land a job at a serious, reputable -- but not at the very top -- university is still remarkable to me.) You should be shooting for more like a top 50 program, I think, although you should not take my word for it but rather apply to a range of programs when the time comes.
Your undergrad GPA does look like a bit of a problem to me. Since it happens that you got your undergrad degree at my university, I know that your GPA is significantly below the average. In fact having a GPA of below 3.0 is significant at UGA for reasons that you understand and thus I don't need to get into.
You mention that your undergrad major is in sociology, and the big question is how much that will be discounted given that you want to study CS. I'll be honest with you: it still doesn't look that great. The best case scenario is that your undergrad GPA will be viewed as something which does not have much to do with your future graduate performance in a different area. So "irrelevant" is the best case scenario. As a member of an admissions committee, a student's undergraduate GPA in whatever subject is not irrelevant to me. Succeeding at coursework is a skill unto itself, and while it is not the highest or most important skill that is necessary for success in a PhD program, it's definitely on the table.
As an aside, I see that in this and another question you describe your major as "irrelevant sociology". I don't think you should say it in quite that way. How relevant your undergraduate studies in a different discipline are to your candidacy as a CS PhD student is for the admissions committee to decide. I detect a hint of disdain for sociology in your language, which to me is also not great: you are the one who chose your undergraduate major. Just because it is very far from CS doesn't mean that you shouldn't have done well at it. Candidates like you have a fine line to walk, e.g. in your personal statement: you need to show but not tell that there is every expectation that you will be an excellent CS graduate student notwithstanding the fact that you were a not-quite-mediocre sociology undergraduate student. Your task is to frame your academic journey in a positive light. Faculty reading graduate applications love to see improvements in students' academic records: among other things, this shows not fully realized potential, and that's really important because almost no one comes into a PhD program fully equipped with the skills they need to graduate from it: it is a very dynamic process, over a period of years. Especially we love to see that students are doing better in the graduate level material than the undergraduate level material.
Back to your specific question: should you take the GRE math subject exam? Other answers have already addressed this question, and I agree with them: if it's required for a CS PhD program (unlikely), then of course take it. If it isn't, then don't: it's a tough exam, to the extent that much above the 50th percentile for an American aspiring math PhD student at UGA looks good enough for us. You could really know undergraduate mathematics perfectly well for all your future needs, take the math GRE, and get a score in the lower quartiles. That won't look good for you.
What should you do instead? I recommend more undergraduate level coursework. You want to launder your GPA by showing that you can nowadays get excellent grades in the undergraduate courses that count for CS PhD program. In most master's programs you can also take undergraduate courses. You should look into this in your program. If it is not possible, you should look into separately enrolling in some kind of "post-bac" program concurrently at the same institution. If you can get mostly A's in undergraduate level math courses, then while your relatively weak undergraduate performance in sociology will not be completely forgotten, it will probably be forgiven by some top 50 program.
[You might ask: isn't graduate level coursework better than undergraduate level coursework? Not necessarily, no. First of all taking graduate level CS courses doesn't necessarily show the mastery of mathematical foundations that you're rightly concerned about. Second of all, GPAs in graduate programs are an entirely different species from GPAs in undergraduate programs. I am unimpressed by a high graduate GPA. I am only negatively impressed by a low one.]
I really do wish you the best of luck and hope you are working for NASA someday. I encounter lots of un-stellar students teaching at UGA and think "Well gosh, they're so young. If they got their act together, they could probably be much more successful. I wonder what lies in their future?" If you succeed in turning your career around like this, I'd really like to know. Somehow your story will be inspirational to me and help me put more effort into reaching students who don't yet have the academia thing all figured out: we all have so much potential lying beneath the surface.