Phase transitions in solids, studied by adiabatic calorimetry. I. Design and test of an automatic adiabatic calorimeter