Update project build settings.

Enable more optimizations for release builds, and add a profile build
configuration. Also enable more warning message options.