fix hit_test for lines + add tests - refs #2041