Section 45. Any city or town, except Boston, may create a board of commissioners of trust funds, consisting of three persons who shall have the management of all trust funds given or bequeathed for the benefit of the town or the inhabitants thereof, unless the donor in making the gift or bequest shall otherwise provide. In cities the commissioners shall be appointed by the mayor and confirmed by the council. In towns they shall be elected in the same manner as other town officers. At the time of creating said board there shall be appointed or elected one member for one year, one member for two years, and one member for three years; and there shall be appointed or elected annually thereafter one member for three years. Vacancies shall be filled by the mayor, with the approval of the council, or by the selectmen.