Kill unit (debug menu): check if unit is valid before erasing from map

Previously Wesnoth would crash if the unit was killed specifically in
its last breath or death event, caused by the assert() in
unit_map::erase().