Cortland police officer recovering after suffering heart attack on duty