Same trouble here.... Cyanogenmod 12.1 + factory reset= teamwin-loop.
You can't recovery boot or download boot?
Try hardware download mode with USB Jig plug. you can buy it at amazon or ebay, or you can do it your own.
It's really simply. Believe it works!
Link: eduwebcell.blogspot.com.br/2015/09/como-fazer-um-jig-usb.html (brazilian-Portuguese language. you can translate it.)
Good lucky
No need to enter the download mode, just leave the teamwin screen loop and make the commands that I quoted above.