BP beat analyst expectations Tuesday, highlighting the improving fortunes of an industry that's withstood one of the deepest downturns in a generation.