Free boundary problems and transonic shocks for the Euler equations in unbounded domains