fix #1013
Merge pull request #1020 from chrox/fix_1013

fix #1013
fix #1011
The #1011 bug is caused by the `contains` check of link box with
visible area. When the link is at the very right (left?) of
the page, enlarged link box often exceeds the page bound rendering
the mentioned `contains` check failed. This patch uses an `intersectWith`
test to check if the link is in current page.
Merge pull request #1014 from hwhw/master

use new FFI based mupdf API
Merge pull request #1021 from chrox/fix_1011

fix #1011
fix #1024
if toc item has expand/collapse state and tap select on the left side
the state switch action is triggered, otherwise goto the
linked page.
expand/collapse for the left one third region should be more resonable
optimize png image to grayscale mode
Merge pull request #1025 from chrox/fix_1024

fix #1024
update to latest base