I am having the same exact issue. In summary; I have confirmed the problem to be with the iPhone itself. I first upgraded my 5S with no problems. I purchased two new iPhone 6 space grey 64GB units and one works flawlessly, but the other is jumping back an fourth on the wi-fi. I first thought it was maybe a router issue, but after confirming the other two units including my iPad 3 (on iOS8) and iPad 4 (on iOS7) also work fine, I decided to troubleshoot further.
Problem detail: The wi-fi randomly disconnects and reconnects to wi-fi, however; when it disconnects, wireless networks are not accessible or viewable at all.
Repair attempts:
Attempt 1: toggled wi-fi on and off, then tried going into airplane mode for 2 minutes. This had zero effect.
Attempt 2: I rebooted the iPhone. Result: The iPhone 6 found and connected to my wireless network with no problems, but after a few hours, it fell offline again.
Attempt 3: I reset the network settings 3 times, and each time the problem was only temporarily resolved.
Proposed attempt 4: After research, It's clear that even a full whip and reload of the phone with factory setting has not resolved the issue for other users. I will not waste any more time here.
Conclusion: I'll be taking my effected iPhone 6 back to the apple store for replacement.