A Study of Preflare Solar Coronal Magnetic Fields: Magnetic Energy and Helicity