Move all database access to IndexRepository. Use the same database during the entire indexing-rendering process. Add a simple smoke test for render.php. Co-authored-by: haszi <haszika80@gmail.com>