Development and calibration of the tracking Compton/Pair telescope MEGA