Fix tag counts update upon photo deletion

The API call in method ApiPhotoController::delete must be issued before the photo
is deleted otherwise it returns an empty result.