After a major research failure forced Imara to lay off almost all of its workforce, the Boston biotechnology company is offloading its most advanced experimental medicine to a well-funded startup.