Safety devices of escalators or moving walkways responsive to, or preventing, jamming by foreign objects