Silicon Valley residents are making more money over the past decade, but those gains have been far outpaced by the rising cost of housing and other living expenses.