Why we live in hierarchies: a quantitative treatise