New York will become the nation’s largest city to enact a ban on gas heat and stoves in new buildings. It’s a major step away from fossil fuels that is expected to influence wider markets.