SAN FRANCISCO — A recent diversity push has bolstered the ranks of women working in traditionally male-dominated Silicon Valley, but those gains are at risk as new data indicates that growth in female representation in the tech sector is beginning to slow.