Joe Marler's farewell turned into a nightmare for Harlequins as Bristol stormed to a 48-24 victory in a 10-try thriller at The Stoop on Friday.