An Efficient Method for Simulating Light Curves of Cosmological Microlensing and Caustic Crossing Events