San Francisco's gold rushes all reshaped housing and politics