The settlement ends a four-year investigation into Google’s tax affairs.