Some small tweaks/changes

Hello Shish,

Some small changes from a while back that I forgot to commit and open a pull request.

- First, removing a link to a non-existent "script.js" file in the Danbooru2 theme. 
- Second, adding the ability to have the date in the thumbnail title (when you hover) an image.
- And some small speed related tweaks, (mostly just no need to call count($var) every time if $var isn't changing..)

Thanks! :3