Travis CI: enable OS X build

Refactor platform-specific calls from .travis.yml to separate .sh scripts.
Test suite still needs to be enabled & tested for OS X though.
Merge branch 'master' into experimental
Drop the Environment class.