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`.
For example, the following makes WordPress work:
```Dockerfile
RUN apt-get update && apt-get install -y libpng12-dev && rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-install gd \
&& apt-get purge --auto-remove -y libpng12-dev
RUN docker-php-ext-install mysqli
```