California plans to convert residents’ food waste into compost or energy, becoming the second state in the country to do so after Vermont.