Applied pull request patch https://github.com/magento/magento2/pull/12516.patch (created by @lfluvisotto) based on commit(s):
1. 702d7fe27916ed66dbb72af5bd59d07c58d546bf
2. 66556661476c7727af7e7a2b75c2e37519aafc49
- moved Dir\Search from Module to Component library and made it more general
- refactored view file collectors
- refactored collector of e-mail templates from themes
- refactored theme:uninstall command
- refactored config file resolver for widgets
- refactored collector of theme customization files