Move the package calculation into the standard library.

On the way to properly wrapping the operation of "flx" so
it can be used programmatically by tools such as pkgtool.
Merge branch 'master' of github.com:felix-lang/felix