The man who opened fire in a Buffalo grocery store on Saturday, killing 10 people, appears to have been motivated by a white nationalist ideology known on dark corners of the web as the “great replacement theory.