Magnetized collisionless shocks in the universe and the laboratory