Timestamp for image ratings
SQL: Force index in plv_images

MariaDB 5.5 doesn't pick up index for pl_imageratings by itself
Migrate database interaction library to PDO and prepared statements
Migrate main page to new data scheme

 * Refactor grid view computation:
   - Operate on copies instead of references and return the result,
     because copies are usually faster in PHP and make for a better
	 API.
   - Preserve original thumbnail list instead of sorting it back to
     that state.

 * MariaDB creates temporary tables and is slow when joining views.
   It is signifantly faster to incorporate the query of the view into
   the main query.
Introduce checks to prevent runtime warning

 - Also, Sublime Text 2 removed lots of white space at line endings.
CSS: Fixed grid size for missing thumbnails