add finish_record_or_union method

Add a finish_record_or_union to the GCC API.
This lets GCC do a bit of cleanup and finalization after all the
fields have been added.