The surprise settlement brings a long-running legal battle between the two tech firms to an end.