German Chancellor Angela Merkel has agreed to aim for a limit on Germany's refugee intake, marking a significant retreat from her previous rejection of a cap.