Change the Contours API to [Contour] from the opaque 'Contours'

WARNING: Not yet tested.

This refactoring has several benefits:
1) We can use native haskell combinators, for example:
  - map contourArea cs
  - filter ((>94) . contourPerimeter) cs
2) It fixes a purity bug. Previously, if two entities were concurrently
running mapContours, which mutates a pointer, then we could break the
system (consider one contour twice or skip another contour).