add swipe event detection in gesturedetector.lua
use swipe gestures in menu widget to signal page turn
bug fix for swipe gesture detection (nil x or y)

a complete_last_ev var is used to make sure the first argument
to isSwipe() method has no nil x or y entry.
use left swipe for next page turn
correctly report timeout on select timeout
use ReaderRolling.view_mode instead of self.ui.document.view_mode

view_mode is removed from self.ui.document
Merge pull request #682 from houqp/swipe

Swipe gesture support
Merge branch 'new_ui_code' of github.com:hwhw/kindlepdfviewer into new_ui_houqp
add last_percent field in pdf/djvu document history
And normalize last_percent for cre document
add percent_finished for KPVBooklet and restore original last_percent
Merge pull request #687 from houqp/new_ui_houqp

bug fix in readerrolling
Merge pull request #689 from chrox/sync_last_percent

add last_percent field in pdf/djvu document history
bugfix: check renderpg hash before hinting page
Merge branch 'new_ui_code' of git://github.com/hwhw/kindlepdfviewer into new_ui_code