Add index to look up cat URL.

This is needed since we check for uniqueness if a cat
URL is supplied. It cannot be unique because the column
can contain NULL values if the user decides to upload
their own image instead.
Clean up uploader.

Remove unused comments, fixed indentation.
Validate can only submit URL or upload file.

Also cleaned up test suite a bit.