I can understand your reluctance. May I suggest the following? How about if you get the blood test? If it's positive, then you'll know the problem and can fix your head. If it's negative, you really should work with a doctor and see if he can figure out what it is. Ask him to check out some of the other things suggested. If none of them solve your headaches, then you can try the gluten free diet - to be sure.
As far as the bet goes- what conditions are set are between you and Jim, I just think they should be clearly established, to avoid any misunderstandings. I strongly suspect that he's more interested in helping you figure out the cause of your headaches then in winning a bet.
I know people with celiac who follow the gluten free diet. My impression is that it takes some getting used to, but it isn't that miserable or complicated, once you get used to it. Nowadays supermarkets like Whole Foods have gluten free sections where you can buy special mixes, etc. which helps.
If it's positive, then you'll know the problem and can fix your head.
If Alicorn has celiac, then her quality of life will improve if she avoids gluten. However, this might not prevent her headaches.
I've been collecting data about my headaches and diet for almost four months now. I don't see any patterns - annoyingly, I get headaches nearly every day, so there's not much information - but I thought I'd post the data set and see if anyone sees anything. Here it is. Hopefully someone finds this an interesting problem.
It's written in note-to-self format (abbreviations like "strawbs" for "strawberries"; if I mention a complicated dish once then I'll shorten it when I eat the leftovers, as "pasta" for "pasta with artichokes and spinach and pesto"; times given approximately and not in a consistent form and often without specifying if they're a.m. or p.m., though they are in chronological order). Quantities aren't given, although if they're suspected to be relevant I may be able to remember specific instances (for unusual foods) or typical portions (for ordinary foods) - other details might also be recollectable similarly. I also don't notice when headaches go away, so I don't know how long they last except when they last all day or become noticeably worse during their course. My sleep schedule varied considerably over this period, but trends more night owl than early bird (for a while I was outright nocturnal). I moved three time zones west at the end of July, should that matter at all.
I'm not soliciting commentary on my diet except insofar as it can be compellingly related to my headaches.
ETA: Assume that every single day I'm drinking lots of skim milk. (2-6 cups depending on how much I eat and how it's spaced out.) There's a couple of exceptions, mostly when I'm in transit for most of a day or run out of milk, but not many and they don't seem to correlate with headaches.