Can I remain in Italy for three more weeks past the expiry of my study visa, as a tourist/on a tourist visa (ie for up to 90 days in any 180 days)?
Let's put it this way: The time spent under a long-stay visa doesn't count towards the 90-days-in-any-180-day-period maximum stay under Schengen rules. So, at the end of your study visa, as a British citizen, you can unambiguously be allowed to stay for another 90 days. You do not need a visa for that and it's not limited to tourism. Schengen rules certainly cover studies / education as well, as you found out on gov.uk. Whether you can “remain” in Italy obviously depends on the following question.
Do I have to leave Italy before the expiry of my study visa, and only re-enter Italy again after its expiry, but this time on a tourist visa?
There is no explicit requirement to do so in the Schengen Borders code but some countries' border forces seem to insist on it. We have countless questions about this but still no comprehensive answer and I don't know about Italy's stance.
Does the fact that I've been in Italy on a study visa for over 90 days on a study visa affect my ability to be in Iton a tourist visa (ie does the tourist visa limit of 90 days in any 180 days apply to all visas/reasons for being in Italy (including the study visa), or does the 90/180 days limit only apply to periods of tourist visa?
The Schengen Borders code is not phrased that way, there is no such thing as a “tourist visa” and no definition of what counts towards the 90-day limit. Instead, article 6(2) is phrased the other way around, i.e. time spent under a residence permit or long-stay visa doesn't count towards the limit for short stays. That said, the conclusion is essentially the same: Having been in the Schengen area on a study visa doesn't automatically preclude a subsequent visa-free visit.
I am using a somewhat guarded formulation because, as always when visiting a foreign country, border guards do have the power to refuse entry for any of the usual reasons (lack of resources, doubts regarding your intent to leave the Schengen area, concern that you present a risk for public safety…) but with a clear and legitimate purpose like completing your course and passing an exam, there is no reason this should be a problem.
I'm aware of the example of back-to-back visas in the "Handbook for the processing of visa applications and the modification of issued visas" however the complication/confusion in my case is that the tourist visa isn't actually a second visa that's put into my passport, but is calculated retrospectively from entry and exit stamps in the passport.
I am not sure what you are describing here. A visa would indeed usually be attached as a sticker in your passport (easiest for you) but, no matter the form it takes, you need to show it to the border guards for the rules I just mentioned to apply. If what you have is only entry and exit stamps in your passport, then you may already be on a visa-free short-stay in the Schengen area. It will certainly look that way to border guards, especially outside Italy.
To understand all this, you need to realize that even if countless online sources use confusing and imprecise terminology, there is no such thing as a separate Schengen “tourist” visa or category. Schengen rules simply cover all short stays, no matter their purpose (tourism, business, family visits, training, medical treatment, even work if you have permission). Any and all stay under Schengen rules, whatever their purpose, do count towards the 90-day limit.