An investigation into the Gulf of Mexico oil spill has revealed that BP and its contractor were aware of flaws in the cement mix used to build the rig.