i dont know that a malfunction of any of the "safety" switches will cause your headlights to go out when you try to crank. what this leads me to is the thought that when you hit the starter button, the required amperage/ voltage to energize the starter motor is not there. all voltage diverts... headlights go out.
i know you said the battery and connections were good, but i am curious as to your measured voltage while cranking. batteries often fail under load.
how about a jump start from another 12v source? if it works... fine. if not jump the starter solenoid directly(bypasses all safety switches/ most wiring).
good luck! keep at it... youll get it.