Instead of QgsGraphBuilder::graph() taking the ownership of the graph
and leaving the QgsGraphBuilder in an unpredictable state, add an
explicit "takeGraph" method which takes the existing graph and
make the existing "graph" method just return a copy of the graph.
Also fix corresponding memory leaks in network analysis processing
algorithms.
Fixes#44079
Checks whether a function declaration has parameters that are
top level const.
const values in declarations do not affect the signature of a
function, so they should not be put there.
Turns out there isn't any valid ones anyway - the only
multiline versionadded tags are due to incorrect ordering
of brief/since tags (which is fixed in a different PR)