SAN FRANCISCO (Reuters) - Four major tech companies including Apple and Google have agreed to settle a lawsuit accusing them of conspiring to hold down salaries in Silicon Valley, just weeks before a high profile trial had been scheduled to begin.