Overhaul of image upload and storage components. Using gm for resizing, supporting gifs, and created imageuploads table for later orphan image tracking.
Added gallery uploading.
Ignore tmp directory contents.