main-common.h: Add reassign_string().

Simple patch to introduce a convenience function that can
reassign heap-allocated string pointers in place.

Change-Id: If810fe10d4149749202d73f3cf2c9cfef0298754
3 files changed