Performance of the BGO endcap calorimeter with phototriode readout for the CMD-2 detector