refactor the media upload steps and add rollback for create media item and add catalog item steps.

Change-Id: I67bff60d41cfc6cecbd49506ffa8256cdb0c6d49