Koszul duality in representation theory