How to update from a very old version of Craft?
Ok, after a lot of trial and error I've finally managed to get this site upgraded. Here's a rough outline of the process and what the problem turned out to be:


First, I tried updating one minor version at a time. This led me to find that the problem seemed to be with updating from the last build of 2.4 to the first build of 2.5
The error message on update wasn't super helpful ("There was a problem updating your database"), but by trawling through Craft's log file (craft/storage/runtime/logs/craft.log) I found that the update seemed to be failing when trying to create the table elementindexsettings because (for whatever reason) that table already existed (resulting in the error Failed to apply migration: m150827_000000_element_index_settings).
I can't think why this would be the case, since after each failed update attempt I fully restored my previous database, but since my elementindexsettings table was empty, I dropped it and tried the update again. At this point it worked.


So in summary, the solution was:


Update to Craft 2.4.2726 (and commit this to version control!)
Attempt a manual update to Craft 2.5.2750. When this fails, drop the elementindexsettings table and try running the update again (ie. go to /admin and press the "Finish up" button.
Update to the latest version.


As a side note, I found setting Craft's backupDbOnUpdate config setting to false made the update process much faster and less painful when having to do a lot of attempted updates followed by rollbacks (though obviously if doing this be careful to make sure you have a backup you can restore if the process goes wrong).