Necessary bridges between towns, except when otherwise specially provided by law, shall be built and kept in repair by such towns, and the expense thereof shall be apportioned between them according to the total revenue received yearly from direct taxation in each of such towns, as averaged for the three fiscal years next preceding.