How would bitcoin's power consumption stack up if it were tasked with servicing tens of millions of transactions per second?
It would stay almost the same since the hashing power is not connected to the number of transactions.
Also by the way, no one does tens of millions of transactions per second, visa does something like 40,000 at their absolute peak.
The amount of power wasted by BitCoin indirectly depends on the monetary turnover of the system. Because if somebody can spend $1mln to perform 51% attack and move around $1bln, that will likely be done. Hence, the power wasted is proportional to the turnover of the system. Otherwise, it does not work.
Also, when a bank charges me 1% for a wire transfer, they pay salaries from that money and some people buy food. The power burnt by BitCoin is actually literally immediately irrecoverably physically wasted.
How many libraries of congress can they power with 40MW?
There is no way to do this calculation. At the moment Bitcoin mining uses, let's say 150MW and can do around 4 transactions per second. If you gave the network a 1000 times more hashing power, you'd be using 150GW, and could handle... around 4 transactions per second.
You could do it with an increase in the block size, but the Bitcoinsphere has bitterly resisted all attempts to increase the block size.