[Ada] Small housekeeping work in Expand_N_Object_Declaration

The local function Rewrite_As_Renaming can be called twice in certain
circumstances, which is both not quite safe and unnecessary, so this
replaces it with a local variable whose value is computed only once.

No functional changes.

gcc/ada/

	* exp_ch3.adb (Expand_N_Object_Declaration) <OK_To_Rename_Ref>: New
	local function.
	<Rewrite_As_Renaming>: Change to a local variable whose value is
	computed once and generate a call to Finalize after this is done.
	Simplify the code creating the renaming at the end.
1 file changed