Decision spurs unusually sharp back-and-forth between Justice Sonia Sotomayor’s majority opinion and Justice Elena Kagan’s dissent on the fair-use doctrine.