DENVER—A man accused of killing five people in a rampage in Denver is believed to have written fictional books self-published online that named some of his real-life victims and described similar attacks. The writings are part of the investigation into what led Lyndon James McLeod to carry out the shootings, which took place in less…