A doctor and a woman - known as the "Ketamine Queen" - will stand trial over Matthew Perry's death next year, a judge has ruled.