The problem was that the IMAP prefix was originally set to "~". This was from when I was using a linux server and wanted mail stored in the home folder. Cyrus however seems to deal with the "~" differently, but was happy to work with it as just a regular character, so mail was no longer in the user's home folder, which now suited me better so I didn't look into it any further.
However, upgrading to Snow Leopard Server and Dovecot meant that all the mail folders were stored by Dovecot as ".~.whatever.thefolder.nameis", including e.g. ".~.Drafts". On first starting Mail on the client after the upgrade, the mail all appeared to be there, but there was obviously a problem and I concluded was that although Cyrus could deal with the "~", Dovecot could not.
So, I moved all the local mail up one level out of the "~" folder and threw that folder away. Then I renamed all the Dovecot mail folders to remove the ".~" at the beginning. Reset the client's Mail IMAP path to empty and started the Mail Service on the server. After some activity all the mail is there and accessible, so it basically worked and I'm no longer stuck with that spurious "~" IMAP path prefix. However, many messages are now showing as unread, although not all which is bizarre, but relatively easy to fix, if a bit tedious.
So all I'm left with now is the %u - GUID puzzle.
I understand what the GUID is and that they might want to use that instead of the username, but what I cannot understand is that the dovecot.conf file explicitly states mail_location as /var/spool/imap/dovecot/mail/%u, but the actual folders it creates and uses are /var/spool/imap/dovecot/mail/GUID. So what is telling it to do something different from its own conf file? Where is the configuration parameter that says "use GUID and NOT the username"? That's what I don't get.