Apple Inc reached an out-of-court settlement with U.S. states and other complainants in an e-book price-fixing class action lawsuit, effectively avoiding a trial in which the iPad maker faced as much as $840 million in claims.