See details.

Added proper image size checking.
- Added duplicate image checking, with smart linking option.
- Fixed the MD5 function that take a string as an argument.
- Fixed the calucation of files MD5 hash. The inputstream provided by
the
HttpPostedFile class always returned a null stream in my testings, so
the calculated md5 hash for all posted files is the same.