Wrapped database exceptions in the base backend.

This covers the most common PEP-249 APIs:
- Connection APIs: close(), commit(), rollback(), cursor()
- Cursor APIs: callproc(), close(), execute(), executemany(),
  fetchone(), fetchmany(), fetchall(), nextset().

Fixed #19920.
Removed redundant exception wrapping.

This is now taken care of by the cursor wrapper.
Improved API for wrapping database errors.

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

Thanks Jacob Kaplan-Moss for the suggestion.
Fixed #15901 -- Wrapped as DB-API 2.0 exceptions.