Cycle structure of graphs and hypergraphs: extremal problems and reconstruction