Tweak the travis config.
Fixed build breakage with gcc.
Added travis modes for testing optimized and debug builds.