What's inside a bow-tie: Analyzing the core of the web and of social networks