by slashrsm: Make media_entity_copy_icons() reusable for other modules.
by slashrsm: Add Media as argument on thumbnail().