Massachusetts city legalizes sidewalk electric vehicle charging