Fixes #926. Throttle now takes 'leading' and 'trailing' options to customize behavior.