Refactor PHP enable_modules to support Zend Extensions

Do not use dl() function for testing the shared libraries:
- It can't load Zend Extensions (xdebug, opcache etc.)
- It doesn't handle PHP Extension dependency
- The function has been disabled from some SAPIs in upstream

Add debugging and verbose messages for enable_modules logic:
    DEBUG=true ./php/bin/control restart

Related:
- Bug 1082963 - https://bugzilla.redhat.com/show_bug.cgi?id=1082963
- Commit 02b8866be70322f4a0c0ac255479c0871e0fa4fb
Move Xdebug enabling/disabling logic to enable_modules