Refactors Rakefile for easier management of travis.ci test matrix

Still WIP but usable.