refactor analyze_sequence()

* return a list of spans
* move all printing into main()
* move calculation of shortest span into new get_shortest_span()