Update flex package url's and versions (#2384)
Update flex package url's and versions (#2384)

* Update flex package url's and versions

The old sourceforge page for flex is now defunct. While version 2.6.0
still downloads fine, later versions are no longer hosted there.
Development continues on github. I've adjusted urls to point to this
new location.

In addition, from 2.6.0 onwards, a new naming scheme for releases seems
to have been adopted. I've created a url_for_version function to sort
this out.

* Change flex to an AutotoolsPackage

Also move the url_for_version function to the end of the package
definition.

* Implement the autoreconf function for flex

tmerrick1/spack,mfherbst/spack,lgarren/spack,krafczyk/spack,TheTimmy/spack,EmreAtes/spack,skosukhin/spack,krafczyk/spack,TheTimmy/spack,lgarren/spack,krafczyk/spack,iulian787/spack,lgarren/spack,matthiasdiener/spack,iulian787/spack,iulian787/spack,matthiasdiener/spack,lgarren/spack,tmerrick1/spack,matthiasdiener/spack,matthiasdiener/spack,skosukhin/spack,krafczyk/spack,LLNL/spack,skosukhin/spack,tmerrick1/spack,tmerrick1/spack,EmreAtes/spack,mfherbst/spack,EmreAtes/spack,EmreAtes/spack,iulian787/spack,tmerrick1/spack,TheTimmy/spack,mfherbst/spack,mfherbst/spack,LLNL/spack,TheTimmy/spack,TheTimmy/spack,skosukhin/spack,EmreAtes/spack,skosukhin/spack,LLNL/spack,LLNL/spack,krafczyk/spack,mfherbst/spack,matthiasdiener/spack,iulian787/spack,lgarren/spack,LLNL/spack