A Swindon man's death was drug-related after he smoked a crack pipe the night before his death, a coroner's court has ruled.