Fix: When deleting attachment, remove corresponding thumbnails

Closes #295
Fix: Incorrect constant symbol
Fix Mysql travis database setup
Abort if setupDatabase() failed