Refactor duplicated get_display_name code out of galaxy.model.
Also added test cases. Need to use this downstream in for dataset collections.