Line detection PR #2 follow-up.

This PR includes #2 rebased on top of current HEAD + a commit that cleans up the code and adds an improved adaptive thresholding routine.
No, I mean, we need to return information about each line. Especially angles.

See, if I have two shreds with lines, and they have roughly the same angles, this can be used to find similar shreds (tables, etc)