Thousands rally in Brooklyn against gun violence