Gannett buys thousands of iPhones, iPads for its journalists