Optimize convolute.

Removed two function calls from the generated JavaScript when checking
bounds during convolution.