What should I do if I end up without an adviser?
I think that your best option is the first, but that is based on my personal preference and may not be yours. So let me explain. 

Many students choose an advisor late and are then guided by ideas of the advisor. There is nothing wrong with that. 

Finding an advisor at another school will cause lots of complications both in the short term and in getting everything finished up. 

Moving to another school may not find you an advisor for "your topic" in any case. It will require a new advisor. 

As a student, your short term goal is to get a degree and then move on. There is nothing to prevent you from then going back to your original ideas and developing them. There is nothing but time and hard work to keeping your hand in on those ideas so that you don't get too far out of the current loop if the topic is popular. 

To expand on the first choice, I would choose a highly regarded advisor who has a lot of ideas. Work with him/her on something that is as close as you can get to what you really want to do, but, primarily, work to finish and move on. Your career will last beyond your student days, but you have to get there first. 

I didn't have an advisor (in math) until about your stage. 



I'll note that there is another option that may be open to you. I mention it for completeness, but it is a difficult path to follow. Some students work without much of any advice from an advisor, being very self directed. They need a formal signature and some letters at the end, but the behavior during the course of studies is more like that of a colleague, rather than as a student. You need to arrange this sort of relationship in advance, of course, but it works for some.