Private security spending and guard employment have climbed as companies and communities respond to high-profile attacks, even as violent crime falls.