Google’s former CIO says the search engine’s bitter rivalry with Microsoft taught him a valuable lesson about dealing with competitors