d: Fix wrong code-gen when returning structs by value.
Since r13-1104, structs have have compute_record_mode called too early
on them, causing them to return differently depending on the order that
types are generated in, and whether there are forward references.
This patch moves the call to compute_record_mode into its own function,
and calls it after all fields have been given a size.
PR d/106977
PR target/110406
gcc/d/ChangeLog:
* types.cc (finish_aggregate_mode): New function.
(finish_incomplete_fields): Call finish_aggregate_mode.
(finish_aggregate_type): Replace call to compute_record_mode with
finish_aggregate_mode.