systemc: Add an error check to sc_gen_unique_name.
systemc: Add an error check to sc_gen_unique_name.

Accellera checks for a null pointer, and a test tries using that input.

Change-Id: I0f098f53de37ebbe481ea46e61fc0a9a404c29db
Reviewed-on: https://gem5-review.googlesource.com/c/13302
Reviewed-by: Gabe Black <5c8aa1266c03186393d9e7b3b4e3b14239af8201@google.com>
Maintainer: Gabe Black <5c8aa1266c03186393d9e7b3b4e3b14239af8201@google.com>

gem5/gem5,gem5/gem5,TUD-OS/gem5-dtu,TUD-OS/gem5-dtu,gem5/gem5,gem5/gem5,TUD-OS/gem5-dtu,gem5/gem5,TUD-OS/gem5-dtu,TUD-OS/gem5-dtu,gem5/gem5,TUD-OS/gem5-dtu,gem5/gem5,TUD-OS/gem5-dtu