Add function.throttle() and unit tests