Asymptotically Optimal Change Detection for Unnormalized Pre- and Post-Change Distributions