Fix errors that appeared during deployment of avatar optimization

Review Request #180 - Created Nov. 12, 2011 and submitted

Bogdan-Cristian Tătăroiu
- Use hardlinks for full size avatars when possible, so we conserve disk space.
- Skip users with invalid usernames
- Create 'tiny', 'small', etc folders if missing
- Added verbose parameter that allows one to view progress
- Coding style, don't use " when not needed.

Tasks for Adrian:
- Fix setup script so it does not assume the avatar folder is the default option.
- Resizing seemed to hang for the following users: pascu_iulian, gluon, I had to manually skip them.
- In the account controller, you allow users to upload avatars but you only check their mime type when resizing. This means the user can upload an invalid avatar, but the cached resized versions would not change. Move this check to before you overwrite the attachment and give (user-friendly) errors back to user.
- When user uploads new avatar via "upload attachment" on their profile page, I think caches are not refreshed.

Bogdan-Cristian Tătăroiu
Review request changed

Status: Closed (submitted)