Enable more optimizations, and begin on LTO

More details in each individual commit message.