Fix missing small profile pictures

The profile picture file metadata was not saved properly into managed_files
table, and was overrwritten by an account_save() call. Reordering of
profile picture file metadata update and account_save() solved this problem.

Change-Id: I8cece9984bd6d65ad8a8056fdec64718f3f94be9