Precompute CIE values in edge detection for 2x speedup

When running the test benchmark, I noticed that the dominant step was often edge detection. Upon investigation, it looked like there might be a lot of redundant calculations going on there. So I wrote a quick benchmark, and confirmed that precomputing the CIE values into a slice and reusing them saves a lot of time.

Benchmark results:

```
benchmark         old ns/op     new ns/op     delta
BenchmarkEdge     192006874     78530474      -59.10%
```