Efficient universal numerical multi-level solution methods for complex electromagnetic optimization and inverse problems