BERLIN — President Obama and German Chancellor Angela Merkel on Thursday issued a joint defense of strong American leadership in global security, free trade and combating global warming while cautioning against cozying up to Russia, in what appeared to serve as a message to President-elect Donald Trump.