San Francisco officials on Tuesday took a major step toward banning the purchase and use of facial recognition technology by city personnel, in a move to regulate tools with surveillance applications that local Silicon Valley companies helped develop.