Tesla’s abrupt decision to lay off its electric-vehicle charging team and reduce its investments in public charging is a blow to the U.S. network, which has long relied on Elon Musk to build the bulk of the country’s fast chargers.