Barthelemy Delphine, Psychiatre à Versailles