David Warner's superb century led Australia to a 48 run victory over Bangladesh at Trent Bridge in the ICC World Cup.