CC-5450 : Refactor Media Management

using a preInsert hook on MediaItem to insert Owner Id to the database.