Quickly pulling together thesis after unexpected failure of oral exam
If it helps, your failing is probably more representative of your committee criticizing your adviser rather than you alone. Let me guess -- you work for a assistant/junior Professor or a tenured professor who has fallen out of political favor within the department? My guess is they are "beating on you" as a proxy for your professor because that is how academia works. 

My advice to getting out of this rut is to suss out who on your committee is your adviser's enemy and work more closely with them. To handle a similar situation I had in my PhD I attended "enemy" group meetings and presented updates on my work directly to "enemy's" group. I could learn any objections to my work from the "enemy" right away before presenting in the exam. Over time the deadline for retaking exam became more flexible. I ended up satisfying it a few months before defending my dissertation. Enemy turned to friend and helped me with providing materials and access to characterization tools. Enemy-turned-friend wrote stellar recc letters and helped organize job interview for me. I ended up drafting and publishing 5 manuscripts from the research, on 2 of the papers I offered "enemy/friend" coauthorship and he/she declined. After graduating enemy-turned-friend became department chair and took away my adviser's labspace and used my PhD apparatus for his/her own research.