Remove the need for PartialEq for the Diagnostics. The objective is to
introduce an enum here in the future
that may hold types that do not support
PartialEq. It turns out that we don't really need it though.
Don't require the callers to hold on to the source code string until an
eventual diagnostics code path is hit. Instead it turns out it's
simpler to let the parser consume the source code as string, where
internally after tokenizing it can be moved into the diagnostics and
from there into the code map if needed.
There are a few places where we now clone the source code, but that's
only in cases where we also extract stuff separately (test code) or the
syntax updater.