A New South Wales inquiry is examining one of darkest chapters in Australian criminal history when gay men were violently targeted.