Barnes & Noble buys electronic bookseller