The Whitehead tower of a topological space