Captain Thomas Rew makes a battling century as England book their place in the final of the Under-19 World Cup with a 27-run win over Australia.