[RFC] Refactor codebase

cc @mlubin @IainNZ 
Again this isn't specific to MIP, any solver that returns a different value for ``getobjval`` and ``getobjbound`` can report a gap.