Design and beam test of an electromagnetic calorimeter constructed from high-pressure gas-ionization wiggler tubes