Experimental and theoretical investigations for the tandem alkylation–isomerization reactions between unsaturated carboxylic acids and allyl halides