Mouse Gestures: fixes scroll to top/bottom in some tricky cases. Examples: https://github.com/xiaoxiaoflood/firefox-scripts/issues/36#issuecomment-643693842.
Mouse Gestures: fixes scroll to top/bottom in some tricky cases. Examples: https://github.com/xiaoxiaoflood/firefox-scripts/issues/36#issuecomment-643693842.

And minor code reorganization.

xiaoxiaoflood/firefox-scripts,xiaoxiaoflood/firefox-scripts