CXX-241 Add optimized builds to travis

We can't merge this until https://jira.mongodb.org/browse/CXX-243 is resolved. Also, should we backport this to the 26compat branch?