Tysk polis har gripit en man med islamistkopplingar som misstänks ha planerat en attack mot en proisraelisk demonstration.