Merge pull request #278 from hwhw/master

replace viewport check by clamping
fix no openssl libversion
We need to install openssl libraries because the blank LIBVERSION
variable is not reliable to get rid of the major and minor versions
in the soname of libssl and libcrypto. To make this consistent on all
platforms it's choosen to add the version info in the soname. It should
work on Android (libraries installed in the apk) and Kindle
(libssl.so.1.0.0 is in /usr/lib). If it fails on Kobo (as it always
would be) we probably need to ship with openssl libraries for all platform.
Merge pull request #279 from koreader/chrox-master

fix no openssl libversion
Revert "replace viewport check by clamping"

This reverts commit 00d9ef799639fcd906a845cfaf55b2efb3e5bc8a.
What was intended as a fix introduced new bugs.
fix bug in viewport dimension check

actually, two bugs:
- upper limit was checked with bad math.
- the rectangle wasn't properly stored to self.viewport
fix calculation when calculation is not actually needed