Add bounds checking to line counting - fixes #3

The 'smooth-scroll-lines-from-window-*' functions were capable of
passing bad range parameters to the 'count-lines' and
'count-screen-lines' functions. Now they will simply return 1 whenever a
bounds check fails.
Merge pull request #4 from jbondeson/issue-3

Add bounds checking to line counting - fixes #3