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
Merge pull request #271 from koreader/chrox-master

revert arbitary margin at the end line of italic text
First implementation of util.template()

The util.template function allows for better translations through
dynamic positioning of place markers. The range of place markers
runs from %1 to %99, but normally no more than two or three should
be required. There are no provisions for escaping place markers.

output = util.template{
    _("Hello %1, welcome to %2."),
    name,
    company
}

This function was inspired by Qt:
http://qt-project.org/doc/qt-4.8/internationalization.html#use-qstring-arg-for-dynamic-text
Added unit tests for util.template()
Merge pull request #272 from Frenzie/util.template

First implementation of util.template()
rework util.template() a bit