It could be allergy-related. It could be teething. It could be a growth spurt. Our DD went through a period of terrible sleeping at that age and I was ripping my hair out. I did all the things you did, including eliminating dairy and wheat, and it did seem to help (that is, nights were still bad, but they were REALLY bad if I had dairy that day).
My midwife told me that eating beans, broccoli, cabbage, and other gas-producing foods could cause discomfort and/or gas in the baby, although I didn't see how (because the gas that would be produced from them would be in my intestines and not in my breastmilk, it seemed to me). But it might be worth a try to eliminate those beans and replace them with a different protein source (like free range chicken if you are not a vegetarian).
I have also heard that making sure you get enough magnesium can help both of you sleep better.
This will end. I remember how it was, and how I thought I was going crazy. But from about 6.5 months to about 13 months we suddenly began having (comparatively) great sleep. Hang in there. I remember how terrible it was; I hate those days where all you are doing is getting through them, barely, watching the clock and counting the minutes until you can go back to sleep again.