m_spanningtree Add optional key parameter to SVSJOIN and allow it to do override joins

Slightly more readable version of #892 by @ShutterQuick