Check if the attachment already exists

* Will add _media_hash to _postmeta table when a new attachment is added
* Will check for existing attachment using _media_hash, and tell you if
the file has already been uploaded
* d() function for debug
* Updated _media schema for future use
* Deleted unused themes
* Add 410.php to Twenty Twelve theme
* Made the deleted post detection a lot better
* Added exists query in query.php