Brazilian retailer Companhia Brasileira de Distribuicao (CBD) has reported a 12% rise in second-quarter net profit, helped by stronger sales and cost cuts.