Added configurable CPU throttling.

I added configurable CPU throttling based on a weighted moving average of the iteration time. I tested this by running ActivityMonitor and watching the CPU usage of my process during a load test. My specified max CPU was within ~1% of the CPU usage shown by the activity monitor.