Dont allow upload of non-image formats for user avatar

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Add User#avatar_type tests

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Confirmation url throttle.
Merge branch 'confirmation_protection' of /home/git/repositories/gitlab/gitlabhq
Merge branch 'improve/avatar_upload_only_images' of /home/git/repositories/gitlab/gitlabhq