Cyanogen (mod) for Nokia Lumia 635
Yes, you can install it on your Nokia Lumia.
Nope
It seems the HTC M8 running Windows Phone is essentially identical to the Android version, just using a different operating system.
Given it's a Windows Phone device, I believe you won't be able to do that.
Thank you! Let me know if you need anything else.