(4) Legislative body, unless otherwise provided by special act or by charter adopted under the provisions of chapter 99, as applied to unconsolidated towns, means the town meeting; as applied to cities and to consolidated towns and cities, means the board of aldermen, council or other body charged with the duty of making annual appropriations; as applied to boroughs and consolidated towns and bo