Institut Medico-Educatif IME du Grand Besançon, Institut médical à Besançon