Fix detection of active module bundles.
Refactor manual SQL to DBAL abstraction layer for multi-database compatibility.
Merge pull request #1341 from drak/module_extensions

Fix detection of inactive module bundles for DependencyInjection Extensions