Australia shares end flat ahead of US inflation data as mining, energy stocks drag