The use of complexity hierarchies in descriptive set theory and automata theory