If an uncaught exception is thrown during parsing of the php.ini file, `$extDir` will contain a combination of the exception and the path. This script shouldn't care about error messages though as long as it gets the path. This updates the script so that php won't emit any error messages.
This matches the behavior of `docker-php-ext-configure` and `docker-php-ext-install`, and ensures that `nm` is installed and then removed in Alpine where necessary.
This also updates `docker-php-ext-install` to invoke this script properly after successful extension compilation.
If modules are determined to already be enabled, it'll skip them appropriately.
This removes simple warnings like `PHP Warning: Module 'curl' already loaded in Unknown on line 0`, and enables things like `pecl install mongo && docker-php-ext-enable mongo`.