refactor relationship grouping code a bit

 * move main logic to Entity::Release
 * move formatted_date to Entity::Link
 * don't use "each"
 * wrap a few lines to 80 cols