Set history to node before adding to sites tree
Set history to node before adding to sites tree

Change SiteMap to set the HistoryReference to the (temporary) SiteNode
before adding it to the tree, the node is expected to have a reference.

Fix #4356 - Internal Error while obtaining URLs through the API

zaproxy/zaproxy,zaproxy/zaproxy,gmaran23/zaproxy,thc202/zaproxy,Ali-Razmjoo/zaproxy,psiinon/zaproxy,Ali-Razmjoo/zaproxy,zaproxy/zaproxy,kingthorin/zaproxy,thc202/zaproxy,gmaran23/zaproxy,meitar/zaproxy,kingthorin/zaproxy,zaproxy/zaproxy,gmaran23/zaproxy,psiinon/zaproxy,zaproxy/zaproxy,thc202/zaproxy,psiinon/zaproxy,zapbot/zaproxy,kingthorin/zaproxy,Ali-Razmjoo/zaproxy,meitar/zaproxy,psiinon/zaproxy,thc202/zaproxy,zapbot/zaproxy,zaproxy/zaproxy,meitar/zaproxy,meitar/zaproxy,thc202/zaproxy,thc202/zaproxy,zapbot/zaproxy,Ali-Razmjoo/zaproxy,zapbot/zaproxy,kingthorin/zaproxy,Ali-Razmjoo/zaproxy,meitar/zaproxy,zapbot/zaproxy,meitar/zaproxy,zapbot/zaproxy,gmaran23/zaproxy,kingthorin/zaproxy,psiinon/zaproxy,gmaran23/zaproxy,zapbot/zaproxy,meitar/zaproxy,gmaran23/zaproxy,psiinon/zaproxy,kingthorin/zaproxy,psiinon/zaproxy,meitar/zaproxy,Ali-Razmjoo/zaproxy,zaproxy/zaproxy,gmaran23/zaproxy,thc202/zaproxy,kingthorin/zaproxy,Ali-Razmjoo/zaproxy