Fix bug in table_log_restore_table().

I originally haven't discovered that table_log_restore_table() is broken
for probably from the beginning: The varchar structure to be returned by the
function allocates its string value within the current active SPI Proc
memory context. However, SPI_finish() is called straight before we're
constructing the table name return value, which deletes the current active
SPI memory context, leaving an deallocated varchar pointer. The adapted test script
in the new regression tests already showed this bug: table_log_restore_table()
returns garbage in this case.

Call SPI_finish() before building the varchar structure with the table name
returned to the caller. While at it, adjust the regression test to match the
real expectations for table_log_restore_table().