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.
It seems that it's better to apply this smart-ass thresholding to each shred in split.py and then pass it to feature detectors as we'll reuse it for sure.