AGILESim: Monte Carlo Simulation of the AGILE Gamma-Ray Telescope