Nottingham Forest striker David McGoldrick has completed his permanent move to Ipswich by signing a two-year contract.