Obama, Romney clash over foreign policy in final debate