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.
Many false positives come from "wide" lines on the image. This gives a number of related detected lines, all within a marginal slope and intercept. 

Histogram of angles would likely work nice. Another approach might be using algorithm similar to RANSAC, to come up with a consensus on the lines angle and pick only matching ones (+-90º)