Merge pull request #245 from koreader/chrox-master

fix cannot open libpthread.so error on kobo
fix mis-indentation

somehow the bottom of the file was mis-indented.
No functional change in this commit.
add wrapper function for fractional grayscale color values
remove support for deprecated numerical 4bpp color values

Now color values have to be "typed" via the ColorNNN types.
add accessors for black/white colors
add default colors for painting
make blitbuffer data providers operate non-inverted
make blitbuffer data consumers/framebuffers operate non-inverted
add method to fill whole blitbuffer with a color

we want this to make our buffers white, now that white is not "0"
anymore.
initialize framebuffer blitbuffers with a white color
reimplement/fix dimRect() and lightenRect()

dimRect() and lightenRect() did assume that 0=white, 15=black
(old 4bpp inverted colors), thus did work the other way around.
Fix this. Drop the pixel dim/lighten methods, rather use a
blend with WHITE and (by default 50%) alpha.

The lightenRect() method changed in its inner workings by this
patch. Before, it applied a minimum value, leaving bigger
values untouched. Now, it is blending, i.e. making an alpha
blend with black (yes, black, not white, see below).
That reduces code footprint, and may look slightly better, too.

TODO: rename this methods. They do exactly the opposite as what
their names suggest.
Merge pull request #246 from hwhw/master

Unroll color inversion
build: fix libjpeg-turbo build for armv6
build: remove arm flags for emulator
Merge pull request #247 from koreader/kindle-legacy

build: fix libjpeg-turbo build for armv6
fix interface for annotation writing to PDF files

also, add a test for this.
Merge pull request #248 from hwhw/fix_kr1052

fix interface for annotation writing to PDF files
switch to 8bit buffers for crengine and djvu backend
fix kindle toolchain selection