A CdTe gamma-ray spectrometer with imaging capabilities for astrophysics: Monte Carlo simulation results