Small, fast-moving U.S. tech firms are using the war in Ukraine to demonstrate a new generation of military systems but face the challenge of selling them to a risk-averse Defense Department.