Six months after a merger deal fell through, leaving the company to face possible bankruptcy, Therapeuticsmd Inc. agreed to license U.S. commercialization rights for its women’s health care products to Australian firm Mayne Pharma Group Ltd. in exchange for $140 million up front plus milestone and royalty payments.