Fix bugs #35379 and #35432 by erroring out when the user configures PHP
extensions with conflicting options.
Jani, feel free to refine the way that extensions are detected as shared :)
For this to be foolproof, we either need to guarantee that the extensions have
their PHP_NEW_EXTENSION invoked in the right sequence. Eg: PDO should be
handled in the configure script before any of the extensions that depend on it
are handled... tricky.
By happy coincidence, the alphabet ensures that pdo is configured before all
the pdo_ extensions, and also before sqlite, so this works for now.