Effect of B-complexes on lattice structure and electronic properties in heavily boron-doped diamond