A bill in Massachusetts would create a framework for a geothermal utility, with the aim of heating and cooling buildings cleanly and affordably.