Rewrite thumbnails CSS, thus purging the last bit of glamdrol

The new code is mostly intended to require me to do less maths next time
I need to change something about it, and center (un-)floated thumbnails
correctly on small screens without extra overrides.

It's also MediaWiki-proof (hence the unused .thumb p and .thumbcaption
rules), not that anyone needs that right now.