July was NYC’s safest ever, but gang violence up in northern Brooklyn