Fix TYPE_SPECIFIC_FIELD for types created via arch_type
A type's TYPE_SPECIFIC_FIELD is supposed to be initialized as appropriate
for the type code. This does happen if the type is created via init_type,
but not if it created via arch_type.
Fixed by extracting the initialization logic into a new set_type_code
routine, which is then called from both places.
gdb/ChangeLog:
* gdbtypes.c (set_type_code): New function.
(init_type, arch_type): Use it.
Signed-off-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>