Add LegacyPdoSessionHandler class

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #12833
| License       | MIT
| Doc PR        | N/A

Fix for #12994 on the 2.7 branch.

The changes made to the PdoSessionHandler in 2.6 introduced a
backwards-compatability break for users upgrading from 2.5. This update
introduces a LegacyPdoSessionHandler class that uses the old service's
functionality.

Users who cannot make schema updates or do not want to lose sessions can
use LegacyPdoSessionHandler until 3.0.