The Supreme Court sided with Google and Twitter in a pair of cases that alleged social media liability in terror attacks overseas.