Merge pull request #264 from koreader/chrox-master

fix missing default waveform mode
convert pic_jpeg interface to pure Lua/FFI solution

pic_jpeg had a wrapper lib before that was needed because of the
libjpeg API which uses setjmp/longjmp error handling.
By using the TurboJPEG API that comes with libjpeg-turbo, we can
use a pure Lua/FFI based approach.
Merge pull request #265 from hwhw/master

convert pic_jpeg interface to pure Lua/FFI solution
fix off-by-one in writePNG() method
fix RGB16 to 8bit grayscale conversion
Merge pull request #266 from hwhw/master

Fixes for blitbuffer implementation
don't trust Lua GC with MuPDFs objects

Use explicit fz_free_.../fz_drop_... for MuPDF objects instead
of registering a function that would do so upon garbage collection.
Garbage collection can't really be relied upon - especially, since
Lua doesn't really know how much memory the MuPDF objects claim
and would only use the footprint of a pointer for calculation.
Merge pull request #267 from hwhw/master

don't trust Lua GC with MuPDFs objects
Apply only changed properties instead of reapplying them all.
Merge pull request #268 from erosennin/props-apply

Apply only changed properties instead of reapplying them all.
add LodePNG to base, implement PNG handler for pic.lua
add giflib and corresponding interface to pic.lua
bugfix Makefile: deletion of bad download libjpeg-turbo

A copy and paste leftover is corrected
Merge pull request #269 from hwhw/master

PNG and GIF file handling for pic.lua
Handle the Kobo timing workarounds.

Also, always wait for submission on Kindles for FULL updates,
that bit of logic got lost when I killed the wait_for_full_marker flag.
Merge pull request #270 from NiLuJe/sandbox

Handle the Kobo timing workarounds.
revert arbitary margin at the end line of italic text
fix android build of gif library