Scotland is set to change how domestic homicides and the suicide of the hidden victims of domestic violence will be investigated in future.