Adding configure logic in branch 'feature/configure-script'

The changes I have accumulated are now in a new feature branch 'feature/configure-script'.  

The most recent changes revert to ed use from sed (to please Solaris) and tweak Travis CI to test both cases:
- a build with an installed NLopt library which is used
- a build where NLopt is downloaded as needed