Improved API for wrapping database errors.

Thanks Alex Gaynor for the proposal.
Added PEP 3134 exception chaining.

Thanks Jacob Kaplan-Moss for the suggestion.