The MEGA project for Medium Energy Gamma-ray Astronomy