Move everything related to syndromes to a new file, which can be shared with linux-user. Backports 1fe27859427bd377a45708310947de54c687d9ff