Amazon is buying Abesbooks.com, the used- and rare-books online bookseller.