Backend: img doc: keep the first page of each doc + its thumbnail in memory

Signed-off-by: Jerome Flesch <jflesch@gmail.com>