The president's zigzagging approach to foreign policy sacrifices the idealistic to the demands of the moment.