WIP: Connect to ECOS through MathProgBase

As well as other refactorings related to this