The Supreme Court appeared frustrated by the poor fit between the law and technology in a clash between law enforcement demands and firms’ desire to protect customers’ privacy.