I've had the same problem. I was trying to fix, that my N5 was not automatically connecting to my AP.
I modified the wpa_supplicant.cfg and after that as an effect nothing seemed to work.
The Wifi stuck on *as the thread already names it* on 'turning on'.
I deleted the whole wpa supplicant after making a backup, so that I can keep all those WPA, WEP, WPS-keys, ... etc.
Restart -> done fixing !