Ad exchanges, demand-side and supply-side platforms, and measurement firms automate the buying and selling of digital ads in real time.